Install up-to-date Java (JDK) and 64-bit Firefox Plugin

Hi everyone.

I’ve just installed an up-to-date version of Java (actually the JDK so it’s good for both regular users and programmers alike) and the new 64-bit browser plugin for Firefox. I tried to make sure that I installed them so that they became the default installation used by the system, but did not harm or otherwise cause problems with other Java-related software that may be installed in the system.

I’ve been trying this since about Suse 10.2 or 10.3, so I have a little experience in doing this, but I do not believe I am knowledgeable enough to say with any degree of certainty that I haven’t missed anything or done something wrong. So far everything is good for me.

$java -version


java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) 64-Bit Server VM (build 11.2-b01, mixed mode)

The Java plugin tester page confirms that the correct plugin is loaded and working, about:plugins in Firefox also shows that the plugin is loaded and ready to go (but the suffixes column is empty) and Java Webstart worked correctly when I tried it from here (the orange ‘Launch’ button near the bottom of the page).

So everything seems to be working well, but additions and corrections from people with more experience with this stuff would be great.

For the sake of anyone else that would like to try the same thing, here’s what I did. Also please remember that this is for x86_64 machines.

Go to Sun’s Java SE downloads page and click the download button for JDK 6 Update 12. On the following page, select Linux x64, leave the language as multi-language, tick the license agreement box and hit the continue button.

On the next page you will be offered two choices. The first choice (and the one you don’t want) is the one with the file name ending -x64-rpm.bin; the second choice (which you do want) is the one with the file name ending in -x64.bin

You download the file by clicking the blue file name. It’s probably obvious to most people, but I was briefly confused about how to download it because of the tick boxes next to the file names.:shame:

Once you have the file downloaded to your computer do the following.

#   **As root** cd into the directory where the download was saved (*cd ~/downloads*?)and then...
cp jdk-6u12-linux-x64.bin /usr/lib64/jvm/jdk-6u12-linux-x64.bin
cd /usr/lib64/jvm
chmod +x jdk-6u12-linux-x64.bin

#   Agree to the license and wait for initial installation to finish.
#   Register it online if you like and then...

rm jdk-6u12-linux-x64.bin
ln -sf /usr/lib64/jvm/jdk1.6.0_12/jre /etc/alternatives/jre
ln -sf /usr/lib64/jvm/jdk1.6.0_12/bin/java /etc/alternatives/java
ln -sf /usr/lib64/jvm/jdk1.6.0_12/bin/javaws /etc/alternatives/javaws
ln -sf /usr/lib64/jvm/jdk1.6.0_12/jre/lib/amd64/ /etc/alternatives/
ln -sf /usr/lib64/jvm/jdk1.6.0_12/jre/lib/amd64/ /etc/alternatives/javaplugin
ln -s /usr/lib64/jvm/jdk1.6.0_12/ /etc/alternatives/jdk
ln -s /etc/alternatives/jdk /usr/lib64/jvm/jdk

This should give you a fully-working and up-to-date Java installation (JDK and JRE) that the system should use by default to run Java applications, set up the links for the new 64-bit browser plugin for Firefox and also enable launching of apps from pages via the newly installed Java Webstart.

However, there are still two things that I should mention. The first is that Java programs don’t seem to be launchable through KDE. This isn’t really surprising to me because they never have been since I first installed 11.1. And before I installed this JDK I also installed the KDE 4.2 Factory packages which have so far been about a stable as a tripod made of jelly. So I’m not going to pursue the notion of launching Java applications by being able to just click on a .jar file from Konqueror. Although they still launch perfectly fine from the CLI and from .desktop files.

The second thing is that the commands above do not uninstall the IcedTea plugin. The IcedTea plugin appears to be an open-source implementation of a Java plugin for Firefox. Some people have complained that having both plugins installed has lead to problems. So given that IcedTea is now redundant, I removed it. If you wish to remove it then simple search for in YaST and uninstall it.

After that, you should be done. :smiley:

Please add a post if you know of any corrections or improvements that could be made.

OpenSUSE 10.3, 11.0 and 11.1 offer ready made packages of 1.6.0-u12 for i586 and x86_64 through regular YaST online update.

rpm -qa "java-1_6_0-sun*"

java -version 

java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) Server VM (build 11.2-b01, mixed mode)

S | Name                  | Type    | Version         | Arch   | Repository
i | java-1_6_0-sun        | package | 1.6.0.u12-1.2.1 | i586   | openSUSE-11.1-Update
i | java-1_6_0-sun        | patch   | 514             | noarch | openSUSE-11.1-Update
i | java-1_6_0-sun        | patch   | 476             | noarch | openSUSE-11.1-Update
i | java-1_6_0-sun        | patch   | 376             | noarch | openSUSE-11.1-Update
i | java-1_6_0-sun-devel  | package | 1.6.0.u12-1.2.1 | i586   | openSUSE-11.1-Update
i | java-1_6_0-sun-plugin | package | 1.6.0.u12-1.2.1 | i586   | openSUSE-11.1-Update

Hah! I wish I’d known that before going to the trouble of manually installing it.

I guess it must have been 10.2 that I first installed a JDK on. I remember looking for it in YaST, being unable to find it and figuring it must be like lots of other packages that either take a long time to get updated or stay at the same version as when Suse was released and just get security updates to that version. I guess I must have never thought to check if anything had changed since then.

Oh well. Thanks for posting and letting me (and everyone else) know that there’s an easier way of getting it installed. :smiley:

Just out of curiosity, why is it that the up-to-date version isn’t installed by default and preference is given to the open alternative? Is it because it’s open?


OpenSUSE 11.1: A new license signals renewed community | The Open Road - CNET News