Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

First, make sure you have the version of Java that you will need.   To find out what version of Java is currently installed, enter "java --version". Edustructures recommends using Version 6 or higher of Java. If you have the correct version of Java, please skip to the next section of this chapter. If not, please continue with the following steps.

...

  You can learn about or download versions of Java at

...

Oracle Java SE Downloads

  • We recommend using the latest version of Java based on your Linux/Unix distribution. To download the correct version, select the link on Oracle's website for Java. Then, if your operating system is not automatically detected, select "All Java Downloads" and navigate to the latest version of Java for your distribution. Download that version, and install it according to the instructions for your Linux distribution. Using your distribution's conventional method for application installation will help to make certain that the application is installed using the most secure method.
  • The following sample instructions were written using Version 6 Update 3 of Java and the Centos 5 distribution of Linux.
    In this example, the jre-6u3-linux-i586-rpm.bin is used.
  • Once it has been downloaded, make the Java installer executable by entering this line: chmod +x [name of installer]
    For example:

...

  •    chmod +x jre-6u3-linux-i586-rpm.bin
  • Run the .bin file. If you are in the directory with the installer you can do this by entering this line: ./jre-6u3-linux-i586-rpm.bin
  • At this point, the java --version still appears as 1.4. To correct this, remove the existing symbolic link pointing to java and create a new one pointing to the new java that was just installed.
  • In this example there is a symbolic link to java in /etc/alternatives/. In that directory, remove the existing java symbolic link.
    cd /etc/alternatives
    rm java
  • Create a new symbolic link pointing to the new java. For example:
    ln -s /usr/java/jre1.6.0_13/bin/java /etc/alternatives/java
    Please note that this path is relative to the version of Java being installed.
  • Now the "java -version" command will bring up the new version of java that has just been installed.

...

  • This completes the steps you need to take to make sure the correct version of Java is installed.