Oracle Java on CentOS 6 - shawfdong/hyades GitHub Wiki
On RHEL/CentOS 6, Java is by default provided by OpenJDK. The package java-1.7.0-openjdk provides an open-source version of Java 7; and java-1.8.0-openjdk provides an open-source version of Java 8. OpenJDK, however, does not include the Java web browser plugin, nor Java Web Start. Those are provided by the IcedTea project (the icedtea-web package on RHEL/CentOS 6).
The Terascala Management Console (tmc.jnlp) is a Java Web Start application. We tried IcedTea in early 2013; but it didn't work (it may work now). So we ended up installing Oracle Java on Pleiades for running the Terascala Management Console.
Download the Linux x64 RPM package from http://java.com/en/download/manual.jsp
Install Oracle Java:
# rpm -Uvh jre-8u31-linux-x64.rpm
Now we have 3 versions of Java on Pleiades: java-1.7.0-openjdk, java-1.8.0-openjdk, & Oracle jre-8. We can use the alternatives tool to set the default Java[1].
Display information about the Java link group:
# alternatives --display javaInitially it only included java-1.7.0-openjdk & java-1.8.0-openjdk, with java-1.7.0-openjdk being the default.
Add Oracle Java to the alternatives system (and give it the highest priority):
# alternatives --install /usr/bin/java java /usr/java/latest/bin/java 200000 \ --slave /usr/bin/javaws javaws /usr/java/latest/bin/javaws \ --slave /usr/bin/jcontrol jcontrol /usr/java/latest/bin/jcontrol \ --slave /usr/lib64/mozilla/plugins/libnpjp2.so libnpjp2.x86_64 /usr/java/latest/lib/amd64/libnpjp2.so
Note alternatively, you can manually enable the Java web browser plugin:
$ cd ~/.mozilla/plugins $ ln -s /usr/java/jre1.8.0_31/lib/amd64/libnpjp2.so
Use Java Control Panel (/usr/bin/jcontrol) to adjust security level settings, among other things[2].
There are several ways to run Java Web Start applications[3]:
- Running a Java Web Start Application From a Browser
- Running a Java Web Start Application From the Java Cache Viewer
- Running a Java Web Start Application From the Desktop
- Running a Java Web Start Application From the Command Line, e.g.:
$ javaws tmc.jnlp