Locating the Java home directory and version

Locate the home directory and check the Java™ version before you install CAS.

About this task

When you install CAS on a UNIX system, you need the following information about Java on your system:
  • Identify the JAVA_HOME directory. You are prompted for its location during the CAS installation.
  • Verify that a supported version of Java is installed. If a supported version is not installed, you must install it before you install CAS.
    Note: To use CAS over SSL in a FIPS-compliant environment, you must install IBM® Java on the server where the CAS agent runs.
The java command contains the JAVA_HOME directory. For example, if the JAVA_HOME directory is:
/usr/local/j2sdk1.4.2_03
Then, the java command is:
/usr/local/j2sdk1.4.2_03/bin/java

Procedure

  1. To determine your location and version of Java, use the which java command. For example,
    [root@yourserver ~]# which java
    /usr/local/j2sdk1.4.2_03/bin/java
    
    The JAVA_HOME directory is /usr/local/j2sdk1.4.2_03.
  2. If the which java command returns a symbolic link, use the ls -ld <symbolic_link> command to determine the real Java directory name.
  3. If the which java command returns the message command not found, then Java might be installed, but is not included in the PATH variable. In this case, use the find command to locate the Java directory; for example,
    [root@yourserver ~]# find . -name java
    ./usr/bin/
    
  4. To check the version number, from the java directory, run the java -version command. For example,
    [root@yourserver ~]# /usr/local/j2sdk1.4.2_03/bin/java -version
    java version "1.4.2_03"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
    Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)
    
  5. Note the Java version that is returned. You are not prompted for this information, but if an issue arises later, you can eliminate the possibility of an unsupported Java version.