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 <john@math.nwu.edu> writes that he succeeded with the
following steps:
- Get linux-x86.jdk.pre2.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.16.bin.tar.gz 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.
- Get ld-so.1.7.11.tar.gz from ftp://ftp.ods.com/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 <sgreene@access.digex.net> 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 ftp.ods.com, get the rpm available for ld.so.1.7.11.
Check any RedHat mirror site for:
/pub/mirrors/redhat-2.1/updates/RPMS/ld.so-1.7.11-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 -ivh ld.so-1.7.11-1.i386.rpm' on your system.
- 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!
Steve adds: If I understand the on-line notes correctly, bin/java is a script
that calls the run-time Java interpreter (used to run Java
applications), bin/javac is a script for the Java compiler for
compiling applications and applets, and bin/appletviewer is a
script that allows you to look at an exisiting (compiled) applet.
A number of demonstration applets are in the demo directory. The
applet viewer requires a file name.
I haven't figured out the correct syntax to run bin/appletviewer
directly, but I figured out an alternative by examining the script
file. To run a demo, I enter this command from the top of my Java
directory tree, /usr/local/java on my system):
bin/java sun.applet.AppletViewer demo/<directory_name>/exampleN.html
where <directory name> is the subdirectory off demo, and N is the
number of the example file (some directories have more than 1).
The first time you run Java, a license screen (which reminds me of
Netscape's) is displayed.
I've started the tutorials available from Sun's java site and the similar one
put out by the NTMUG. I've discovered some problems with the syntax in Sun's
tutorial, so I've been following the NYMUG tutorial instead for now.
Next Chapter,
Previous Chapter
Table of contents of this chapter,
General table of contents
Top of the document,
Beginning of this Chapter