Search

Categories

Links

Referers

Compiling javac

Aug 08 2005, 05:36:05 PM PDT »Java»Compiler Comments [2]
You can now easily build javac using a new ant build file I added to Mustang in b47. Go to make/sun/javac/ant and type ant to build the compiler. This creates ../../../../build/shared/classes which you can place on the "bootstrap" class path when running javac:
/usr/java/jdk1.6.0/bin/javac -J-Xbootclasspath/p:../../../../build/shared/classes

So far there are only two useful targets:

compile
Compile javac and all clients (javadoc and apt)
clean
Remove any output from the compile target

I use ant version 1.6.5 which comes with NetBeans 4.2

UPDATE: b47 is now available for download.

Post a Comment:
Comments are closed for this entry.
Comments:

Hi Peter, I'm looking for a "java representation of java"... Which would basically parse a java source file and build up a java object model of the source. Before I try and download the 6 source code and sign up to licenses, does the compiler employ such a model (I suspect not because of the needless intermediate object creation)? Do you know of any open-source projects that have this type of model (and are detachable from their parent project!)? I don't have a lot of time and my progress on my own version is slow and has suffered due to other project commitments. Hope you can help! Gary

Posted by Gary Bentley on September 06, 2005 at 05:44 AM PDT #

Please see my recent blog entry on the Tree API.

Posted by Peter von der Ahé on September 23, 2005 at 03:11 PM PDT #

Java is a trademark of Sun Microsystems, Inc.
Copyright © 2006,2007 Peter von der Ahé