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.javajavac --release 17 Hello.javaRelated terms
- compiler — A program that translates source code a person wrote into a form a machine or runtime can execute, checking it for errors on the way.
- class file — The file javac writes for each class, holding that class's bytecode plus a description of its fields and methods.
- --release flag — The javac option that compiles for an older Java release, checking against that release's library and writing its class file version.
- JDK — The Java Development Kit: the Java runtime plus the tools that build programs, such as the compiler javac, the disassembler javap and the jar tool.
Taught in
- The Virtual Machine, The Kit And The Runtime — Modern Java: Virtual Threads & High-Throughput Services
- Release Trains And Long Term Support — Modern Java: Virtual Threads & High-Throughput Services
- The Lifecycle Of A Java Program — Modern Java: Virtual Threads & High-Throughput Services
- Fifty Items, Five Traps — Oracle Certified Professional: Java SE 21 Developer (1Z0-830) Exam Prep
- A Hundred And Twenty Minutes, Fifty Items — Oracle Certified Professional: Java SE 21 Developer (1Z0-830) Exam Prep
- Modules: Exports, Opens And Services — Oracle Certified Professional: Java SE 21 Developer (1Z0-830) Exam Prep
- Jars, Automatic Modules And Runtime Images — Oracle Certified Professional: Java SE 21 Developer (1Z0-830) Exam Prep
- Platform And Virtual Threads, Runnable And Callable — Oracle Certified Professional: Java SE 21 Developer (1Z0-830) Exam Prep
- Sprint: Modules And Concurrency — Oracle Certified Professional: Java SE 21 Developer (1Z0-830) Exam Prep
- Serialization: What Survives The Trip — Oracle Certified Professional: Java SE 21 Developer (1Z0-830) Exam Prep
- Paths And Files With NIO.2 — Oracle Certified Professional: Java SE 21 Developer (1Z0-830) Exam Prep
- Locales, Resource Bundles And Formatting — Oracle Certified Professional: Java SE 21 Developer (1Z0-830) Exam Prep
- Mock Exam: Sit It, Score It — Oracle Certified Professional: Java SE 21 Developer (1Z0-830) Exam Prep
- Final Review And Exam Day — Oracle Certified Professional: Java SE 21 Developer (1Z0-830) Exam Prep