JDK requirements for Sun Management Center 3.5 are listed in the following table.
Table 2–5 JDK Requirements
Type the command which java to determine where Java is installed.
The path to the Java executable is displayed, for example:
> which java /bin/java |
The path shown might be a symbolic link.
Type the command java -version.
The Java version is displayed.
>java -version Java(TM) 2 Runtime Environment, Standard Edition (build 1.2.0_01-b03) Java HotSpot(TM) Client VM (build 1.2.0_01-b03, mixed mode) |
In the above examples, the version of Java installed in /bin/java is not sufficient for installing Sun Management Center 3.5 using the graphical user interface. The Java version is also not sufficient for running the Sun Management Center console and server.
To use the graphical user interface to install, setup, and run the Sun Management Center console and server, you must install the required version of the Java software, which is included on the Sun Management Center 3.5 installation CD 1 of 2.
Log in as root (su - root).
Remove the path to the current version of the Java software.
Assume that /bin/java is where the current version of the Java software is installed, and that /bin/java is a symbolic link to /usr/j2se.
Edit your .login or .cshrc file, and remove /bin/java from the PATH statement.
Rename the current Java directory.
Assume the current Java version is 1.2. You could rename the current Java directory to Java version 1.2 using the command mv j2se java1.2. For example:
# cd /usr # mv j2se java1.2 # ls java1.2 COPYRIGHT README.html jre/ opt/ LICENSE bin/ lib/ src.zip README include/ man/ |
If needed, you can still use the current version of the Java software for other projects by resetting the JAVA_HOME environment variable.
Delete the symbolic link.
For example, if /bin/java is a symbolic link to /usr/j2se, you would type the command rm /bin/java.
Install the JDK from Sun Management Center 3.5 installation CD 1 of 2.
Insert Sun Management Center 3.5 CD 1 of 2 in your CD-ROM drive.
List the contents of the CD.
# ls -p /cdrom/cdrom0 Copyright classes/ lib/ JDK1.4.1_02/ image/ sbin/ ThirdPartyLicenseReadMe install/ |
The JDK directory on your Sun Management Center 3.5 machine might show a different version.
Go to the JDK directory on the CD.
List the contents of the JDK directory.
# cd /cdrom/cdrom0/JDK* /cdrom/cdrom0 # ls -p Solaris/ Windows/ |
Install the JDK packages using pkgadd.
Type the command pkgadd -d /cdrom/cdrom0/jdk_dir/Solaris, where jdk_dir is the name of the JDK directory on the CD.
A list of packages is displayed, and you are prompted to select the packages you want to install.
Press Return to install all of the packages. The JDK packages are installed in the /usr/j2se directory.
Reset the JAVA_HOME environment variable to /usr/j2se.
In a C shell environment:
# setenv JAVA_HOME /usr/j2se |
In a Bourne or Korn shell environment:
# JAVA_HOME=/usr/j2se # export JAVA_HOME |
Set the JAVA_HOME environment variable in your .login or .cshrc file.