Compiling just the classes in the JDK source

Chris Hegarty chris.hegarty at oracle.com
Thu Jun 7 02:01:30 PDT 2012


On 07/06/2012 08:48, Paul Sandoz wrote:
> Hi,
>
> How can i compile just the classes in the JDK rather than everything including re-building all the modules?
>
> Say i built Jigsaw already then i made a tweak to one source file e.g. org.openjdk.jigsaw.SimpleLibrary. I want to compile that source file then stuff that Java class into the appropriate area in the existing JDK library.
>
> I know it is risky :-) but for certain cases one knows nothing else has changed.
>
> Paul.

WARNING... WARNING... NOT FOR THE FAINT-HEARTED!!

:> cd myrepo/jdk/src/share/classes/org/openjdk/jigsaw
:> javac -d . `find . -name "*.java"`
:> jar -uvf myrepo//build/solaris-i586/lib/modules/jdk.base/8-ea/classes org
   (Or update the image, 
solaris-i586/jdk-module-image/lib/modules/jdk.base/8-ea/classes)

This only works because the classes are currently stored in a zip 
archive. If this changes the above will obviously not work.

</WARNING>

-Chris.



More information about the jigsaw-dev mailing list