|Description: Open source implementation of Java SE.|
|SHARCNET Package information: see OPENJDK software page in web portal|
|Full list of SHARCNET supported software|
Java is a general-purpose, object-oriented language which is designed to have few platform dependencies. Both the runtime environment and development tools are installed on SHARCNET clusters. The purpose of this article is to assist the user in deploying, executing, and trouble shooting Java programs on SHARCNET.
There are a number of ways that your program might be deployed onto a SHARCNET cluster: pre-installed software, as a RPM file, as a JAR file, or from source. Supported software, found [here], has an staff member assigned to support it and does not require deployment. An RPM package, typically available with a complete software platform, will have the steps prepared and typically involve more than just the Java environment. The remainder of this article will deal with the last two options, installing from java ARchive (JAR) files or directly from source.
For systems that do not currently have Java 8 installed, or to use the Oracle jdk, complete the following instructions.
- type 'bash /home/edward/public/scripts/java8setup.bash' on the command line.
- logout & login again
You should now have a oracle jvm available. You can test this by logging into a development node and typeing 'java -version', You should see the following:
java version "1.8.0_73" Java(TM) SE Runtime Environment (build 1.8.0_73-b02) Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02, mixed mode)
Note that this script modifies your path. To disable this jdk delete the following line from your .bashrc file. I will periodically download the latest jdk, by using it you agree to the Oracle which you can view here Oracle Binary Code License Agreement for the Java SE Platform Products and JavaFX.
A JAR file may be an "executable JAR file" which allow you to execute the program directly from the JAR file.
Error Message: Unsupported major.minor version 52.0
Cause: You are attempting to execute a java program on a different version JRE than it was compiled on. Often seen when running a Java 8 program on SHARCNET which is set up with Java 7.
Fix: Install the Java 8 (or appropriate version) in your home directory. To install Java 8, perform the following steps.
The following systems have Java 8 installed located at '/usr/lib/jvm/java-1.8.0-openjdk.x86_64/bin' this can be added to your path in your .bashrc file.
Systems: angel, brown, copper, goblin, hound, iqaluk, kraken, mako, mosaic, orca, redfin, saw, tembo, vdi-centos6, windeee, wobbie.