Two weeks ago Sun Microsystems announced opensourcing href="http://openjdk.dev.java.net/">key Java implementations including javac, the Java programming language compiler. You
can get the javac source code also from netbeans.org with a detailed
tutorial to getting, building, and running the javac sources
in NetBeans IDE.
Since the javac sources are available as NetBeans project inside the IDE, you can easily build and run the compiler as well
as investigate how things work inside. For this the Profiler can be also useful showing you the stack traces and other
information about compiler's runtime. Just follow these five simple steps to check out how easy is now to profile javac.
build.xml: append href="http://profiler.netbeans.org/blog/txt/javacProfile/target.txt">target
profilefor example below target
profilein the combo and click OK.
That's all - now you are profiling compilation of Anagram Game by the javac!
app.dir:root directory of profiled project/application
app.mainclassfile:relative path to mainclass java file of profiled project/application
app.srcdir:relative path to profiled project/application source root
app.builddir:relative path to profiled project/application compiled classes root