The Java programming language Compiler Group
This group is comprised of
developers involved in the design, implementation, and maintenance
javac compiler for the Java™ programming
language, and associated components.
javac compiler reads source files written in
the Java programming language, and compiles them into class files.
The Java programming language is defined by The
Java Language Specification (JLS) and class files are defined
Java Virtual Machine Specification (JVMS).
Optionally, the compiler can also process annotations found in
class files using the Pluggable Annotation
Processing API (JSR
The compiler is a command-line tool but can also be invoked using the Java Compiler API (JSR 199).
javac compiler source code is available in the
OpenJDK Mercurial repositories, at http://hg.openjdk.java.net/.
- The master sources are in http://hg.openjdk.java.net/jdk9/jdk9/langtools.
- We integrate to the master repositories through the "dev" forest, so the very latest sources for the compiler are in http://hg.openjdk.java.net/jdk9/dev/langtools. The integrations normally happen bi-weekly; you can see information about JDK 8 on the JDK 9 Project page.
For general information about the OpenJDK repositories, and how
to clone them, see The
OpenJDK Developer's Guide. For the compiler, you can download
and build it as part of a complete JDK forest, or you can just
download and build the
langtools repository to build a
standalone version of the compiler.
Note that the code for the native launcher for
javac is shared with all the other JDK tools, and
lives in the JDK repository. If you just download and build the
langtools repository, you will get an executable jar
file which you can invoke directly with the
command, or with a simple shell script that is provided. Windows
users will need Cygwin or similar packages to run the shell
IssuesIssues are tracked in the JDK Bug System. Most compiler bugs are tracked in the tools component, javac subcomponent.
- If you've cloned the
langtoolsrepository, here's how to ...
- The Hitchhiker's Guide to javac
- Compiler Package Overview
- Compilation Overview
- Guidelines for tests in the “langtools” repository
Oracle home page for
- So you want to change "javac" ...
- So you want to change the Java Programming Language...
The following links are for resources about the compiler, provided by non-Oracle contributors. These resources may not be completely up to date.
- How to Modify javac by Raoul-Gabriel Urma, Janina Voigt, and Martijn Verburg (Java Magazine, 2012)
- Hacking the OpenJDK compiler by Alexander Hristov (2010)
- The Hacker's Guide to javac (PDF) by David Erni and Adrian Kuhn (2008)
- javac posts on crazyjavahacking.org
- JDK 6, JDK 7, JDK 8, JDK 9
- Type Annotations
- Code Tools
- Mailing list for enhanced metadata in Java SE 8