Mandrake doesn't come with Java support. Kaffe doesn't count. So here is the way I get
the official Sun Java to work on my Mandrake 9 install. It works well enough that I can
run Java apps such as LimeWire, so I imagine that it is working properly. I'm not a huge
fan of Java, although it is nice to have official something for Linux.
I will assume for this tutorial that you are mildly familiar with the command line, so
I will not tell you to press
Enter every time, and I won't tell you to open
a console. I will assume that you know how to browse webpages and know how to download
a file to your home directory. If you can't do these things, find out first, and then
come back to this tutorial later. But if you managed to get Linux installed, you ought
not to have a problem with this. :)
Go and download the Java RPM from
Sun's Java Page.
The most current version at the time of this writing is j2re1.4.1, and I will assume that you
have the same version. So make changes where appropriate if you have a different version.
When you reach the page that lists all the downloads, choose the JRE Download for "Linux RPM in self-extracting file."
Save this to your home directory somewhere. If you want to do Java developing, you can get
the SDK version, which is nearly twice the size, and requires an extra couple of steps that
I will outline below.
Now, from a console, you need to run this file like so:
sh j2re-1_4_1_01-linux-i586-rpm.bin.
Read the license and agree to it. After you accept the license, it will extract the RPM. (If you
got the SDK, substitute the filename where appropriate.)
This will produce an output file called j2re-1_4_1_01-fcs-linux-i586.rpm, which you
must now install. In the console, run
su. Enter the password for root when it
asks you for it. Now, run
rpm -ivh j2re-1_4_1_01-fcs-linux-i586.rpm. The Sun
JRE is now installed, but it is not the default for your system yet. We will fix this
now. (If you got the SDK, substitute the filename where appropriate.)
In the same console, as the root user still, we must go and delete the old symlinks
and replace them with new ones that point to the Sun Java binaries.
If you downloaded the J2RE, run the following sequence of commands:
cd /usr/bin
rm java javac jar
ln -s /usr/java/j2re1.4.1_01/bin/java java
If you downloaded the J2SDK, run the following sequence of commands:
cd /usr/bin
rm java javac jar
ln -s /usr/java/j2sdk1.4.1_01/bin/java java
ln -s /usr/java/j2sdk1.4.1_01/bin/javac javac
ln -s /usr/java/j2sdk1.4.1_01/bin/jar jar
Now, in order to be able to use Java in browsers, such as Mozilla, Galeon, and so forth,
you must complete these additional steps:
cd /usr/lib/mozilla-1.1/plugins/
If you got the J2RE, use this command:
ln -s /usr/java/j2re1.4.1_01/plugin/i386/ns610/libjavaplugin_oji.so libjavaplugin_oji.so
If you got the J2SDK, use this command:
ln -s /usr/java/j2sdk1.4.1_01/jre/plugin/i386/ns610/libjavaplugin_oji.so libjavaplugin_oji.so
Now you are done, and you can close the console. Try installing a Java program, such
as LimeWire, and it should work just fine.
I will try to keep this tutorial up to date from time to time, but it is
not really my priority, since I really only installed Java for the purpose of
installing LimeWire.