Java + Firefox + Debian

Getting JAVA to work with Firefox under Debian GNU/Linux is a real pain in the ass. This is what I did to have a working java:

1. Download the j2 runtime environment (j2re) kit from SUN as RPM.
Goto: http://java.com/en/download/manual.jsp
Select: Linux RPM (self-extracting file)

2. Run the self-extracting .bin file

chmod 755 jre-1_5_0_02-linux-i586-rpm.bin

3. Download Alien to convert RPM to DEB

apt-get install alien

4. Convert the RPM file with alien:

alien j2re-1_4_2_07-linux-i586.rpm

5. Install deb:

dpkg -i j2re_1.4.2_07-1_i386.deb

6.

cd /usr/lib/mozilla-firefox/plugins
ln -s /usr/java/j2re1.4.2_07/plugin/i386/ns610-gcc32/libjavaplugin_oji.so .

7. You need to run unpack from the /usr/java/j2re1.4.2_07 directory, as:

./unpack rt.pack rt.jar
./unpack jsse.pack jsse.jar
./unpack charsets.pack charsets.jar
./unpack plugin.pack plugin.jar

8. Start firefox, and browse to about:plugins url.

OR

edit /etc/apt/sources.list, add

deb http://public.planetmirror.com/pub/ubuntu-backports/ hoary-backports main universe multiverse restricted deb http://public.planetmirror.com/pub/ubuntu-backports/ hoary-extras main universe multiverse restricted
apt-get update apt-get install sun-j2sdk1.5

restart firefox

Leave a Reply

Your email address will not be published. Required fields are marked *

7ads6x98y