Compiling Java under HLFS

Aki Tuomi cmouse at desteem.org
Sun Jan 8 14:14:42 PST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ok... now.. these instructions are not very good, so I hope someone with
more instruction writing skills writes these to usable form:

Prerequisites

 Install j2sdk1.4.x 
 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
                                   in JRL)
 Install ALSA

Preparing

 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)
  http://cmouse.desteem.org/jdk-1.5.0/jdk-1.5.0-slipstreamed-hlfs.patch

 Get javamake.sh from 
  http://cmouse.desteem.org/jdk-1.5.0/javamake.sh

 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
  http://cmouse.desteem.org/jdk-1.5.0/files.txt
 and run 
  mkdir -p control/build/linux-i586/classes
  cd 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

 Execute
  cd motif/lib/Xm
  make libXm.so.4
 This will fail, don't panic...
  make
  cd ..
  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 
  ./javamake.sh

 This _should_ build java eventually. If it for some reason does not,
 find out and comment it to this email.

Installing

 Ok, you are done. enter control/build/linux-i586
 and execute 
  cp -Rf j2sdk-image /where/you/want/sdk

That's it!

Aki Tuomi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDwY7SahHbMDrZuj4RAhv1AJ0eKzz49Kc3T5h+GzM6DXjQi4lYAQCeKk/2
PAiweCSmcOer4FFawyhGnI0=
=+7Dj
-----END PGP SIGNATURE-----



More information about the hlfs-dev mailing list