Where is the source code for the java compiler? [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this questionI'm looking for the source code of Sun's standard java compiler, javac
.
jdk1.6.0_07 has a few classes that are related, but they are interfaces
(java.lang.Compiler
and javax.tools.JavaCompiler
). There's also some packages under com.sun.mirror.*
and com.sun.source.*
, which seem to be interfaces for representing the java abstract syntax tree.
But I can't find the compiler source - anyone know where it is?
Check this site The Java programming-language compiler (javac) group. The sources are in the Mercurial repositories.
jdk7/tl/langtools (for JDK 1.7)
jdk6/jdk6/langtools (for JDK 1.6)
In the header of the two sites I linked to you find download links for the sources (in bz2, zip and gz format)
There you have the sources in src\share\classes\com\sun\tools\javac\
It's here
精彩评论