Compiling Java under HLFS
cmouse at desteem.org
Sun Jan 8 14:14:42 PST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Ok... now.. these instructions are not very good, so I hope someone with
more instruction writing skills writes these to usable form:
Install xlibs (X.org if you want use this instruction set)
Install jdk-1.5.0 binary version (needed to get some files not included
Get the Java JRL _05 from tiger.dev.java.com. Be sure to take JRL.
Also take the mozilla binary thingie for linux.
Now. If it happens that you don't have GUI on the target server, you
can unpack the stuff locally and upload it.
Get a slipstream patch from (as in, contains all patches + my mods)
Get javamake.sh from
Make a directory called 'jdk-build' and put the sources and javamake.sh
there. Patch the sources.
I hope you know if you're going to end up with linux-i586, 'cos I
expect you do.
Run following commands (change if necessary)
mkdir -p control/build/linux-i586/lib
cp -Rf <jdk-1.5.0-home>/jre/lib/fonts control/build/linux-i586/lib
cp -Rf <jdk-1.5.0-home>/jre/lib/audio control/build/linux-i586/lib
cp -Rf <jdk-1.5.0-home>/jre/lib/cmm j2se/src/share/lib
Then you'll need to uncompress some files that are, dunno why, not
provided by java in JRL package.
Easiest way is to download
mkdir -p control/build/linux-i586/classes
cat /location/of/files.txt | xargs unzip <jdk-1.5.0-home>/jre/lib/rt.jar
This should get you some gifs, wavs and other things java wants...
If you want to do it the hard way, just
unzip -t <jdk-1.5.0-home>/jre/lib/rt.jar
and filter out all those .class and other files...
Then you need to make libXm.so.4
This will fail, don't panic...
mv libXm.so.4~ libXm.so.4
cp libXm.so.4 libXm.so
mkdir -p ../../../control/build/linux-i586/lib/i386/motif21/
cp * ./../../control/build/linux-i586/lib/i386/motif21/
NOW you are ready to make java itself... so. Go to jdk-build and
This _should_ build java eventually. If it for some reason does not,
find out and comment it to this email.
Ok, you are done. enter control/build/linux-i586
cp -Rf j2sdk-image /where/you/want/sdk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the hlfs-dev