javac

The Java compiler command, which reads .java source files and writes one .class file per class.

In more detail

javac is part of the JDK and reports success by printing nothing. Each class, including each nested class, becomes its own class file named after the class. Build tools such as Maven and Gradle run javac for you with the right file lists and options. The --release option makes it produce class files an older JVM can load.

Examples

javac Hello.java
javac --release 17 Hello.java

Related terms

Taught in

References

Certification courses