How can you resolve the following warning
warning: [options] bootstrap class path not set in conjunction with -source 8
when using the internal JavaCompiler
?
Example code (slightly modified from my source):
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
JavaCompiler.CompilationTask task = compiler.getTask(null, null, null, compilerOptions, null, javaFileObjects);
task.call();
The obvious thing I tried was to supply -bootclasspath
to compilerOptions
in the example code above. But you can only supply options in the Option.OptionGroup.BASIC
group (and it is not).
Edit: Some more info: I am using OpenJdk11 and I get the warning for all sources up to 10.