diff --git a/src/jdk.compiler/share/classes/module-info.java b/src/jdk.compiler/share/classes/module-info.java index b1b5b467e00..46104743182 100644 --- a/src/jdk.compiler/share/classes/module-info.java +++ b/src/jdk.compiler/share/classes/module-info.java @@ -23,6 +23,9 @@ * questions. */ +import javax.tools.JavaCompiler; +import javax.tools.StandardLocation; + /** * Defines the implementation of the * {@linkplain javax.tools.ToolProvider#getSystemJavaCompiler system Java compiler} @@ -59,6 +62,78 @@ * {@code jdk.zipfs} module, must be available if the compiler is to be able * to read JAR files. * + *

Options and Environment Variables

+ * + * The full set of options and environment variables supported by javac + * is given in the javac Tool Guide. + * However, there are some restrictions when the compiler is invoked through + * its API. + * + * + * + * The following restrictions apply when invoking the compiler through + * the {@link JavaCompiler} interface. + * + * + * + * Note that the {@code CLASSPATH} environment variable is honored + * when invoking the compiler through its API, although such use is discouraged. + * An environment variable cannot be unset once a VM has been started, + * and so it is recommended to ensure that the environment variable is not set + * when starting a VM that will be used to invoke the compiler. + * However, if a value has been set, any such value can be overridden by + * using the {@code --class-path} option when invoking the compiler, + * or setting {@link StandardLocation#CLASS_PATH} in the file manager + * when invoking the compiler through the {@link JavaCompiler} interface. + * *

SuppressWarnings

* * JLS {@jls 9.6.4.5} specifies a number of strings that can be used to