[oclug] Java + Mozilla on Debian/Sid Unstable mini-Howto
oclug at kernelpanic.ca
Sun Nov 30 04:47:30 EST 2003
There are java packages for Debian/Sid Unstable but the Mozilla plugin
does not work. The issue is packages compiled with gcc2.95 versus
gcc3.2. Mozilla is compiled with gcc3.2. The current Sid java debs are
based off of the gcc2.95 binaries from Blackdown. After some reading I
was able to create a new Java deb using the gcc3.2 java binaries. I
thought I would share.
I installed the Runtime Environment (RE) as I don't need the full
Java SDK. This mini-Howto produces the Java SDK, but I didn't try to
You will need two files. The Blackdown java compiled with Gcc 3.2, and
a diff file to create the debs.
(try http://twolife.free.fr/debian/ if 404)
To build the Debian package you will need atleast debhelper, dpkg-dev,
fakeroot and dependancies.
$ apt-get install debhelper dpkg-dev fakeroot
All the build steps can (and should) be perfomed as a regular user.
# create a directory
# copy the diff and bin to the directory
# you don't need to unpack the bin
$ patch -p1 < j2se1.4-i586_22.214.171.124.1-5.diff
# make debian/rules executable
$ chmod u+x debian/rules
# build the packages
$ dpkg-buildpackage -rfakeroot
# drink coffee, chat on irc, etc
# install one of more packages
# The packages were created in the parent directory.
# You will need to be root to install. I use sudo.
# The RE and SDK packages depend on java-common, and j2se-common. Both
# packages are available from Sid. The package gsfonts-x11 is also
# required which you may already have.
$ sudo apt-get install java-common j2se-common
$ sudo dpkg --install j2re1.4_126.96.36.199.1-5_i386.deb
# optionaly install the sdk
$ sudo dpkg --install j2sdk1.4_188.8.131.52.1-5_i386.deb
# Configure konqueror to use /usr/bin/java. Restart mozilla and you
# should be good to go. If the java plugin for mozilla dosen't work
# make sure that you don't have any stale links or old java files in
# your plugins directories. The correct link is
# javaplugin_oji.so -> /etc/alternatives/javaplugin_oji.so
# and it must be a link.
I can't claim credit for this howto as it is pretty much a rewritten
version of: http://www.klug.on.ca/mhonarc/klug-general/msg00394.html
PS sorry about the long line, but I hate broken URLs.
More information about the OCLUG