5. Building the Linux Java port on stock Linuxes
Contents of this section
In this section, we collect recipes sent to us for building Randy Chapman's Java port on various current Linux distributions:
5.1 Slackware distribution ELF kernel 1.2.13.
John Franks <[email protected]> writes that he succeeded with the following steps:
- Get linux-x86.jdk.static-motif.tar.gz from ftp://www.blackdown.org/pub/Java/linux/ and uncompress it and untar it. (The filenames you must fetch have changes for the 1.0 beta JDK.)
- Get libc.5.2.18.bin.tar.gz (binary distribution, not source) from ftp://tsx-11.mit.edu/pub/linux/packages/GCC/ Uncompress and untar and copy the files in the lib subdirectory of the top level of the hierarchy to /lib. Make sure that /lib/libc.so.5 is a symlink to this file.
- Get ld-so.1.7.14.tar.gz from ftp://ftp.ods.com/pub/linux/ Uncompress and untar it and run "instldso.sh" which is in the top level of the resulting hierarchy.
You should now be able to compile and try the "hello world" program and applet from Sun following the instructions at http://java.sun.com/progGuide/index.html .
5.2 RedHat 2.1/Caldera Preview 2
Steve Greene <[email protected]> reports success doing the following steps. I have edited the recipe slightly, so blame any mistakes on me. The `JDK' he refers to is the Chapman port of the Java Developer's Kit.
- From a Red Hat mirror site, get the rpm available for ld.so.1.7.14. To find it, check any RedHat mirror site for: /pub/mirrors/redhat-2.1/updates/RPMS/ld.so-1.7.14-i386.rpm I know it is available at ftp.pht.com, ftp.caldera.com. and is probably at the other RedHat mirrors as well. Grab it, and do `rpm -Uvh ld.so-1.7.14-1.i386.rpm' on your system.
- Red Hat 2.0 and Caldera Preview 2 users may need the `which' program (it's called by some of the scripts in the JDK). An rpm file for `which' is available at the usual Red Hat mirror sites as part of the Red Hat 2.1 distribution files. Get and install which-1.0.i386.rpm. RedHat 2.1 users should already have which on their system or available within their original distribution.
- Get the tar file(s) for the statically-linked JDK. Untar it from a convenient point. I put mine in /usr/local, so the untar creates /usr/local/java/....
- So you can run java as someone other than root (this is a good idea!), do `chmod 666 /dev/zero'. Red Hat and Caldera have the wrong permissions set on this device out of the box.
- If you haven't already, run ldconfig as root to load the new libraries. If you do "ldconfig -v" you can verify you have all the libraries loaded. (At least we don't have to build an ELF system first!)
- Make sure you're logged in as a user (e.g. non-root). Start X- windows, open an X-Term, and try something!
5.3 Unifix
Stefan Middendorf writes: Unifix is a popular German-language Linux distribution. There are a few distributions based on it: Linux Universe, sold in USA, Linux 4U, currently only distributed in Germany and Linux FT in Britain. This recipe is known to work for Unifix 1.7, Linux 4U 1st Edition, Linux Universe 2nd Edition, and Linux FT 1.1.
- Put linux-x86.jdk.static-motif.tar.gz from ftp://www.blackdown.org/pub/Java/linux/ in /usr/local and uncompress it and untar it.
- Change the first line of the script .java_wrapper from PRG=`which $0` >/dev/null 2>&1 to PRG=`type $0 | cut -d ' ' -f 3` >/dev/null 2>&1
- Get libc-5.2.18.bin.tar.gz (I succeeded with libc-5.2.16.bin.tar.gz, too), extract and uncompress it in the / drectory.
- Get ld-so.1.7.12.tar.gz from tsx-11.mit.edu (or any mirror site) and uncompress and untar it, e.g. in /usr/local. Change to the resulting directory and run instldso.sh. This will also run ldconfig. Probably newer versions of ld-so will work too.
- Add /usr/local/java/bin to the PATH environment variable.
- Get netscape-v20b4-export.i486-unknown-linux.tar.Z, extract and uncompress it in /usr/local/<yourNetscapeDir>.
- Create a Link in /usr/local/bin to ../<yourNetscapeDir>/netscape.
- Put /usr/local/<yourNetscapeDir>/moz2_0.zip in /usr/local/lib/netscape/.
As an alternative to changing your PATH, Ralf Strobel suggests:
- Copy the scripts .java_wrapper and appletviewer and the links @java @javac, @javadoc, @javap, and @jdb from /usr/local/java/bin to /usr/local/bin and you can use them wherever you are.
- In /java/bin/i586 you can add a script called `javadoc` #!/bin/sh `dirname $0`/java sun.tools.javadoc.Main -d <yourhtmldir> $* where if you are user jrandom, <yourhtmldir> would be ~jrandom/.java-html.
Next Chapter, Previous Chapter
Table of contents of this chapter, General table of contents
Top of the document, Beginning of this Chapter