How to Install Sun Java on Debian
Started from: http://www.crazysquirrel.com/computing/debian/java.jspx
I’ve added some notes about installing plugins at the bottom, but I’m not claiming credit for the installation notes, I just wanted to post them here so that I always have an easily locateable copy of the instructions in case something happens to the original information. The above link provides much more in-depth information and resources.

1) Get a SunJVM binary.
http://java.sun.com/

2) Install the Required Builder Package (as root)
apt-get -u install java-package

3) Create the .deb Package File (substitute the .bin file you downloaded from Sun):
(You shouldn’t be root for this step.)
fakeroot make-jpkg jdk-1_5_0_06-linux-i586.bin

4) Install the Java .deb Package (as root)
dpkg -i sun-j2sdk1.5_1.5.0+update06_i386.deb

5) Check that it Works:
java -version

Should be something like the following (the key is that you have Sun’s Java(TM)):
java version “1.5.0_06”
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)

Setting up resources:
1) Create a Virtual Java
ln -s /usr/lib/j2dsk1.5-sun /usr/lib/java

2) Add the Environment Variable to /etc/profile before the “umask 022” line:
JAVA_HOME=”/usr/lib/java”
export JAVA_HOME

3) Install java plugin (this example is for Firefox, 1.7 I believe)
ln -s /usr/lib/java/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla-firefox/plugins

4) Test the installation of your Java plugin.
http://www.java.com/en/download/installed.jsp


Leave a Reply

%d bloggers like this: