jdk.compiler/com.sun.tools.javac.launcher.Main - Java Launcher


How to run "jdk.compiler/com.sun.tools.javac.launcher.Main" tool from JDK lib\modules JImage file?

✍: FYIcenter


"jdk.compiler/com.sun.tools.javac.launcher.Main" tool allows you to launch a Java application directly without compilation.

"jdk.compiler/com.sun.tools.javac.launcher.Main" tool is supported by the jmods\jdk.compiler.agent.jmod module file, which is also linked into the lib\modules JImage file in JDK 9, 10, and 11.

jdk.compiler/com.sun.tools.javac.launcher.Main" tool using the lib\modules JImage file as described below using JDK 11 as an example:

C:\fyicenter>set JDK_HOME=\fyicenter\jdk-11.0.1

C:\fyicenter>%JDK_HOME%\bin\java --module jdk.compiler/com.sun.tools.javac.launcher.Main Hello.java

Hello world!


⇒ jdk.compiler/com.sun.tools.javac.Main - "javac" Command

⇐ jdk.compiler/com.sun.tools.doclint.DocLint - DocLint Tool

⇑ Tools Supported from JDK 9+ lib\modules JImage

⇑⇑ FAQ for JDK (Java Development Kit)

2019-09-27, 1134👍, 0💬