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
Outputs
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
./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/libnpjp2.so /etc/alternatives/libjavaplugin.so.x86_64
ln -sf /usr/lib64/jvm/jdk1.6.0_12/jre/lib/amd64/libnpjp2.so /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 IcedTea.so in YaST and uninstall it.
After that, you should be done.
Please add a post if you know of any corrections or improvements that could be made.