[root@ebao35 jdk6]# su root
[root@ebao35 jdk6]# chmod 777 jdk-6u35-linux-x64-rpm.bin
[root@ebao35 jdk6]# ./jdk-6u35-linux-x64-rpm.bin
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
inflating: jdk-6u35-linux-amd64.rpm
inflating: sun-javadb-common-10.6.2-1.1.i386.rpm
inflating: sun-javadb-core-10.6.2-1.1.i386.rpm
inflating: sun-javadb-client-10.6.2-1.1.i386.rpm
inflating: sun-javadb-demo-10.6.2-1.1.i386.rpm
inflating: sun-javadb-docs-10.6.2-1.1.i386.rpm
inflating: sun-javadb-javadoc-10.6.2-1.1.i386.rpm
正在準備… ########################################### [100%]
1:jdk ########################################### [100%]
Unpacking JAR files...
rt.jar...
jsse.jar...
charsets.jar...
tools.jar...
localedata.jar...
plugin.jar...
javaws.jar...
deploy.jar...
Installing JavaDB
正在準備… ########################################### [100%]
1:sun-javadb-common ########################################### [ 17%]
2:sun-javadb-core ########################################### [ 33%]
3:sun-javadb-client ########################################### [ 50%]
4:sun-javadb-demo ########################################### [ 67%]
5:sun-javadb-docs ########################################### [ 83%]
6:sun-javadb-javadoc ########################################### [100%]
Java(TM) SE Development Kit 6 successfully installed.
Product Registration is FREE and includes many benefits:
* Notification of new versions, patches, and updates
* Special offers on Oracle products, services and training
* Access to early releases and documentation
Product and system data will be collected. If your configuration
supports a browser, the JDK Product Registration form will
be presented. If you do not register, none of this information
will be saved. You may also register your JDK later by
opening the register.html file (located in the JDK installation
directory) in a browser.
For more information on what data Registration collects and
how it is managed and used, see:
http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html
Press Enter to continue.....
Done.
[root@ebao35 jdk6]#
[root@ebao35 jdk6]# rpm -qa | grep java
sun-javadb-demo-10.6.2-1.1
sun-javadb-common-10.6.2-1.1
java-1.4.2-gcj-compat-1.4.2.0-40jpp.115
sun-javadb-core-10.6.2-1.1
sun-javadb-javadoc-10.6.2-1.1
sun-javadb-client-10.6.2-1.1
sun-javadb-docs-10.6.2-1.1
[root@ebao35 jdk6]# rpm -qa | grep jdk
jdk-1.6.0_35-fcs
[root@ebao35 jdk6]#
[root@ebao35 jdk6]# ll /usr/java
總計 4
lrwxrwxrwx 1 root root 16 12月 7 14:38 default -> /usr/java/latest
drwxr-xr-x 7 root root 4096 12月 7 14:38 jdk1.6.0_35
lrwxrwxrwx 1 root root 21 12月 7 14:38 latest -> /usr/java/jdk1.6.0_35
[root@ebao35 jdk6]# alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_35/bin/java 2
[root@ebao35 jdk6]#
[root@ebao35 jdk6]# alternatives --config java
有 2 程式提供 'java'。
選擇 指令
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
2 /usr/java/jdk1.6.0_35/bin/java
請輸入以保留目前的選擇[+],或輸入選擇號碼:2
[root@ebao35 jdk6]#
[root@ebao35 jdk6]# java -version
java version "1.6.0_35"
Java(TM) SE Runtime Environment (build 1.6.0_35-b10)
Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01, mixed mode)
[root@ebao35 jdk6]#
完成^_^
2012年12月6日 星期四
CentOS/RHEL 安裝 jdk-6u35-linux-x64-rpm.bin
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言