solaris修改jdk

1.查看solaris版本

# cat /etc/release
                        Solaris 10 5/08 s10x_u5wos_10 X86
           Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                             Assembled 24 March 2008

2.查看jdk版本

# java -version
java version "1.5.0_14"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
Java HotSpot(TM) Server VM (build 1.5.0_14-b03, mixed mode)
 

3.到http://jdk6.java.net/download.html下载对应jdk版本

jdk-6u30-fcs-bin-b12-solaris-i586-10_nov_2011.sh

4.上传刚下载的jdk文件到/usr/jdk目录下

5.运行如下命令安装jdk

#cd /usr/jdk
#./jdk-6u30-fcs-bin-b12-solaris-i586-10_nov_2011.sh

 6.使刚安装的jdk生效。

将/usr/java里的文件删除。然后将/usr/jdk/jdk1.6.0_30下的文件复制到/usr/java下。

#mv /usr/java /usr/java-bak
#mkdir /usr/java
#cp -rf /usr/jdk/jdk1.6.0_30/* /usr/java
 

7.查看jdk设置是否生效

# /usr/java/bin/java -fullversion
java full version "1.6.0_30-b12"
# java -version
java version "1.6.0_30"
Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
Java HotSpot(TM) Server VM (build 20.5-b03, mixed mode)
 

 

你可能感兴趣的:(Solaris)