Step 1 : download the jdk from http://java.sun.com/javase/downloads/index.jsp ,mine is jdk-6u21-solaris-i586.tar.Z
Step 2 : Assume that the jdk is put in folder located /usr/downloads.Go to /usr/downloads.
- unpackage the file #zcat jdk-6u21-solaris-i586.tar.Z | tar -xf -
- install #pkgadd -d . SUNWj6rt SUNWj6dev SUNWj6cfg SUNWj6man SUNWj6dmo
- go to /etc/profile profile is a file,not a folder .open it with gedit and add statements ,please do not forget export the varible you defined.(The CLASSPATH env varible is required for us too)
JAVA_HOME=/usr/jdk/jdk1.6.0_21 (It's defalt for my installation,you can check this folder /usr/jdk with default jdk1.5 which is installed with the OS system installation)
export JAVA_HOME
JRE_HOME=/usr/jdk/jdk1.6.0_21/jre
export JRE_HOME
PATH=$PATH:$ JAVA_HOME/bin :$ JRE_HOME/bin:
export PATH
Step 3 : Restart the server ,check the jdk version by typing java -version in terminal.
Good luck !!
If the version is not JDK1.6 after you check the version.I just could say it's a big pity for you.Ok,now you have a way to make the default jdk version to be 1.6 . Copy the files under /usr/jdk/jdk1.6.0_21 to /usr/java.Make sure all the files under /usr/java are deleted ahead of time.It is sure that the PATH variable is defiend in some file.I am just looking for the answer.......