Building Swing without building the whole JDK using ANT.
Those of you who are dying to fix your
favorite Swing bug, might have been a bit put off by
the complexity of the full JDK build. For those people
who just want to build swing and be able to play around
with Swing code changes, you might consider using the
following ant file to build just swing. This way, you
dont need the native compilers or any tool other than
ant and the binary and source snapshots.
Make sure to save the above snippet to a file called build.xml and copy it to the j2se/make/javax/swing
To use it, you need to get the binary snapshot associated
with the source you are building. Then you need to
point the bootclasspath in the property section of
the build.xml to point to the rt.jar in that
binary image. Then you need to run ant in
the j2se/make/javax/swing directory. This will build
just the swing (and some other dependancies like awt).
The output will be in j2se/build/classes.
To run using the built classes, simply specify the
bootclasspath to use the newly built classes :
C:\jdk1.6b27\demo\jfc\SwingSet2>c:\jdk1.6b27\bin\java -Xbootclasspath/p:c:/code/mustang/b27/j2se/build/classes -jar SwingSet2.jar
Let me know how this goes. We are looking
forward to your contributions.