Quick Summary to Install Java 1.5 SDK on Debian Testing

This is my second Java installation artical for Debian HK .

To help other Debain user to install Java SDK 1.5. in Debian Testing quickly, Here is my summary steps to install Java SDK 1.5. in Debain testing :

1. Make sure that the contrib section is included in your APT sources ( /etc/apt/sources.list ).

Example: (your may differ a bit, but make sure the contrib part is there)

deb http://ftp.hk.debian.org/debian/ testing main contrib non-free

2. Create a directory ( for example : tempfile) to hold the java files,

3. Download Java SDK or run time 1.5 from Sun Website to that directory.

4. Change to that directory

5. apt-get install java-package

6. fakeroot make-jpkg jre-1_5_0_01-linux-i586.bin, then asnwer the questions.

a sun-j2re1.5_1.5.0+update01_i386.deb package will be built in that directory.

7. Su as root, then run : dpkg -i sun-j2re1.5_1.5.0+update01_i386.deb

8. Verify installation

Execute

java -version

The output should look something like this if everything is well:
java version "1.5.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)

9. Browser Plugin

With Mozilla Firefox from testing/unstable you shouldn't need to do anything as the installation procedure of the Java should have created the symlink properly.

Check the link for Firefox:

ln -s /usr/lib/j2sdk1.5-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla-firefox/plugins/libjavaplugin_oji.so

10 Job Done.

Hope to this quick summary may help those Debian users who want to run Java in Debian.

Kim Man Lau
Date: 16 Feb 2005

回覆