Java for Firefox with Debian GNU/Linux

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.
  2. Run the self-extracting .run file
  3. If you don't have alien yet:
    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.