March 2009 Archives

My last blog entry covered issues running a 64bit Linux desktop. I promised more details on installing and using 64bit Java applet support with 64bit Firefox.

Note this blog entry has been updated on Sept 21st, 2009 to reflect JDK 6 Update 16.

Java Installation Primer
Currently, there are many methods to install Java on Linux:


  1. Use the Sun Java RPMs or installer only.

  2. Use the Sun Java RPMs along with the java-1.6.0-sun-compat RPM to get JPackage policy compliance enabling the /etc/alternatives for managing multiple concurrent Java JVM installation.

  3. Use the Sun Java RPMs provided by your distribution. For example, with Red Hat Enterprise Linux 5, enabling the RHEL Supplementary software channel enables you to install and automatically keep current the Sun Java RPMs which have been repackaged into a JPackage compliant form.

Using Method 1 - Sun RPMs only

When using method 1 above, you'll download the file jdk-6u16-linux-x64-rpm.bin or jdk-6u16-linux-i586-rpm.bin. After making it executable, you'll run the file which will extract and then install the following RPMs:

jdk-6u16-linux-amd64.rpm or jdk-6u16-linux-i586.rpm
sun-javadb-client-10.4.2-1.1.i386.rpm
sun-javadb-common-10.4.2-1.1.i386.rpm
sun-javadb-core-10.4.2-1.1.i386.rpm
sun-javadb-demo-10.4.2-1.1.i386.rpm
sun-javadb-docs-10.4.2-1.1.i386.rpm
sun-javadb-javadoc-10.4.2-1.1.i386.rpm

Finally, to install Java Applet support for Firefox and other browsers that are compatible with Firefox plugins, create a symlink in the Mozilla plugin directory:

  • 64bit Java Applet Support (new with Java 1.6.0_12)

cd /usr/lib64/mozilla/plugins
ln -s /usr/lib/jvm/java-1.6.0-sun-1.6.0.16/jre/lib/amd64/libnpjp2.so

  • 32bit Java Applet Support

cd /usr/lib/mozilla/plugins
ln -s /usr/lib/jvm/java-1.6.0-sun-1.6.0.16/jre/plugin/i386/ns7/libjavaplugin_oji.so

Notice that the browser plugin library filename is different between 32bit and 64bit java.

Using Method 2 - Sun RPMs with JPackage compatibility

To use method 2, install the same RPMs in method 1 above, but then install one more additional RPM that makes the Sun RPMs compatible with the JPackage policy.

That RPM is the java-1.6.0-sun-compat RPM, and you would normally simply obtain it from the JPackage website. The only problem is that as of September 2009, the package is out of date (currently only supporting Sun Java 1.6.0_03).

I have created a java-1.6.0-sun-compat RPM that works with 1.6.0_16. Note that ever since Sun Java version 1.6.0_12 64bit Java Applet support has been available. You can grab it here:

64bit - java-1.6.0-sun-compat-1.6.0.16-1jpp.x86_64.rpm
32bit - java-1.6.0-sun-compat-1.6.0.16-1jpp.i586.rpm

Using the java-1.6.0-sun-compat RPM there is no need to manually create the browser plugin symlink.

For the sake of completeness and if you are into creating RPMs yourself, you might be interested in the SPEC and the SRPM file and the patch to the SPEC. Normally you don't need these files.

java-1.6.0-sun-compat.spec
java-1.6.0-sun-compat-1.6.0_06-to-1.6.0_12.spec.patch
java-1.6.0-sun-compat-1.6.0.16-1jpp.src.rpm

Using Method 3 - Using Sun Java included with your distribution

If you are using Red Hat Enterprise Linux v5 with a RHN subscription, getting the latest Sun Java automatically installed on your systems is pretty easy.

  1. Login to RHN
  2. Subscribe to the RHEL Supplementary software channel on the desired system
  3. Back on your 64bit system run:
    yum install java-1.6.0-sun java-1.6.0-sun-plugin.x86_64
    On a 32bit system run:
    yum install java-1.6.0-sun java-1.6.0-sun-plugin
  4. Optionally, if you want the JDK and not just the JRE (because you plan on compiling Java software), then run:
    yum install java-1.6.0-sun-devel

Issues running a 64bit Linux desktop

| 3 Comments

Running a 64bit Linux desktop has a few bumpy areas. I've been running a 64bit Linux desktop for the past year to take advantage of the 8GB of RAM that my T61p laptop now has. The bumpy areas are:

  • 32bit applications require all the 32bit libraries to be installed. This primarily concerns proprietary apps like Adobe Acroread since virtually all open sources apps are compiled to 64bit binaries already. This isn't a huge issue, just a little more bloat on the hard drive and package updates have to be pulled down for both architectures.
  • The old trick of having mplayer (or similar apps) use DLLs from Windows for some codecs such as WMV9 no longer work. There are workarounds (such as having a separate 32bit version of mplayer installed), but I don't encounter much WMV9 video on the internet -- most sites use Flash video or H.264 nowadays.
  • Linux Flash support. Two ways to address this. Use the 32bit Flash plugin with nspluginwrapper, or use the new (not production quality yet) 64bit Flash plugin (with or without nspluginwrapper).
  • 64bit Java Applet support. Even though Sun has been shipping 64bit Java JVMs forever, there has been no 64bit Java Applet plugin for 64bit browsers. The request has been tracked in the Sun java bug database as bug id 4802695 (bug created in Jan 2003). In 2008 there was some progress outside of Sun to bring 64bit applet support to fruition as part of the IcedTea project's gcjwebplugin with partial success. Finally, on February 20th, 2009 Sun released JDK/JRE 1.6.0_12 with "64-Bit Browser Support for Java Plugin and Java Webstart".

My next blog post will cover how to install and use the new 64bit Java applet support.

About this Archive

This page is an archive of entries from March 2009 listed from newest to oldest.

October 2008 is the previous archive.

April 2009 is the next archive.

Find recent content on the main index or look in the archives to find all content.