Skip to main content
Asked a question 6 years ago

How do I install Oracle's JRE/JDK on a Bright Cluster?

Where am I?

In Bright Computing, Inc. you can ask and answer questions and share your experience with others!

After downloading  the JDK (or JRE)  RPM package from Oracle you can install it as
rpm -Uvh  --relocate /usr/java=/cm/shared/apps/java jre-7u55-linux-x64.rpm
cd /cm/shared/apps/java
ln -s jre1.7.0_55 current

After that you need to add an environment modules file:
mkdir -p /cm/shared/modulefiles/orcale/java
cd /cm/shared/modulefiles/oracle/java
Create a text file called  jre1.7.0_55

Add the following contents to that file:
#%Module -*- tcl -*-
## modulefile
proc ModulesHelp { } {
  puts stderr "\tAdds Oracle Java JRE 1.7.0_55 to your environment variables,"
module-whatis "adds Adds Oracle Java JRE 1.7.0_55 to your environment variables"
set               root              /cm/shared/apps/java/jre1.7.0_55
prepend-path      PATH              $root/bin
prepend-path      LD_LIBRARY_PATH   $root/lib:$root/lib64
setenv            JAVA_HOME         $root

Verify that the correct version of Java is used:
[root@kerndev java]# module load oracle/java
[root@kerndev java]# which java
[root@kerndev java]#