Analytics


Google

Tuesday, September 15, 2009

Upgrading JDK in Sun Solaris

First go to Javasoft to download the software. In this example, I will use the j2se version 6 for Solaris x86. After you confirm all the selection, you have an option to select from 2 versions, one is .sh another is .Z. You only need the .sh version (which only contains the binaries).

The various versions Java is stored in /usr/jdk folder.

After downloading the .sh file to your folder run the following:

chmod +x jdk-6-solaris-i586.sh

to make the file executable.

change to root, then change directory to /usr/jdk

After that, run the script. so assuming the file is in /export/home/strovek/, type

/export/home/strovek/jdk-6u16-solaris-i586.sh

This will extract the every to the folder, in this case to /usr/jdk/jdk1.6.0_16

Then remove the existing symbolic link /usr/java and replace it with the new link

Just type:

ln -s jdk/jdk1.6.0_16 /usr/java

To verify, just type

java -version


Note that there is already symbolic link in /usr/sbin for java, javac etc that points to /usr/java.

No comments: