[Tech] Oracle Java on Ubutu 10.04
James Howard
james at partimus.org
Mon Apr 2 00:41:39 PDT 2012
Hi folks,
It was my understanding -- and correct me if I'm wrong, I'm not a
programme -- that Java would provide a standard programming language
universally inter-operable with any operating system and, in the case of
plugins, any browser. As GNU/Linux users, we quickly found this
best-of-intentions would not come to fruition. Many of us found that
certain applets would only run under the Sun (now Oracle) environments.
While noble in its efforts, OpenJava (and the IcedTea plugin) simply won't
run certain applets, particularly Java 7, and most specifically some of
the Java 7 applets teachers at Partimus supported schools rely on.
Canonical's official position is to use openjdk-6, and if that doesn't
suffice, sun-java6 from the partner repository. Subsequently, canonical
removed Java from its repositories altogetjher.
So, recently, I encountered the challenge of running Java7 applets under
Ubuntu 10.04. I learned that's it's possible, but there are a few
pitfalls. Here's a guide that helped me accomplish this and my summary.
http://debianhelp.wordpress.com/2011/11/13/how-to-install-sun-java-se-1-7/
Here's the Java 7 download from Oracle:
http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html
1) Download and unpack (mine unpacked to java-7-oracle folder, another
versional named it jdk-1.7.0... it may vary as versions are pgraded bu
Oracle)
2) sudo mkdir -p /usr/lib/jvm
3) sudo mv java-7-oracle /usr/lib/jvm
Now, Java has dozens of symlinks that need to be created when you wish to
break out of the distro supplied java runtime environment. Fortunately, a
guy created a tool for making this easy. he distributes via a ppa
sudo apt-get-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install update-java
sudo update-java
Run it (as superuser) and pick the java 7
now verify:
java -version
It should indicate you're now running java 7
Next we need our browser to use it when running the java 7 extensions
First, we clean up the old one if necessary:
sudo rm -f ~/.mozill/plugins/libnpjp2.so \
~/.mozilla/plugins/libjavaplugin_oji.osi
Now we link to the new plugin:
sudo mkdir -p ~/.mozilla/plugins;
sudo ln -s /usr/lib/jvm/java-7-oracle/jre/lib/i386/libnpjp2.so \
~/.mozilla/plugins/
Now we need to get rid of IcedTea plugin:
Open Firefox >> tools >> Add-ons > Disable ICedTea Plugin
http://javatester.org/version.html
Alternatively, you can remove openjdk and icedtea6 debs use apt, but don't
quote me on that)
Chrome searches Mozilla's plugin directory, but I had problems. There may
be a Chome panel item for disabling IcedTea
I apologie for any typos. Good luck, and let me know if you have any
problems. I was able to pull this off on about 4 machines.
More information about the Tech
mailing list