[1] http://www.oracle.com/technetwork/java/javase/install-linux-rpm-137089.html
[2] http://fedoraunity.org/Members/zcat/using-sun-java-instead-of-openjdk
[q.yang@localhost Download]$ ./jdk-6u26-linux-i586-rpm.bin
[q.yang@localhost Download]$ ./jdk-6u26-linux-i586-rpm.bin
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
inflating: jdk-6u26-linux-i586.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
error: can't create transaction lock on /var/lib/rpm/__db.000
Installing JavaDB
error: can't create transaction lock on /var/lib/rpm/__db.000
Done.
[q.yang@localhost Download]$ su
Password:
[root@localhost Download]# ./jdk-6u26-linux-i586-rpm.bin
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
replace jdk-6u26-linux-i586.rpm? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
inflating: jdk-6u26-linux-i586.rpm
replace sun-javadb-common-10.6.2-1.1.i386.rpm? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
inflating: sun-javadb-common-10.6.2-1.1.i386.rpm
replace sun-javadb-core-10.6.2-1.1.i386.rpm? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
inflating: sun-javadb-core-10.6.2-1.1.i386.rpm
replace sun-javadb-client-10.6.2-1.1.i386.rpm? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
inflating: sun-javadb-client-10.6.2-1.1.i386.rpm
replace sun-javadb-demo-10.6.2-1.1.i386.rpm? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
inflating: sun-javadb-demo-10.6.2-1.1.i386.rpm
replace sun-javadb-docs-10.6.2-1.1.i386.rpm? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
inflating: sun-javadb-docs-10.6.2-1.1.i386.rpm
replace sun-javadb-javadoc-10.6.2-1.1.i386.rpm? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
inflating: sun-javadb-javadoc-10.6.2-1.1.i386.rpm
Preparing... ########################################### [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
Preparing... ########################################### [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@localhost Download]# exit
exit
[q.yang@localhost Download]$ java -version
java version "1.6.0"
OpenJDK Runtime Environment (build 1.6.0-b09)
OpenJDK Client VM (build 1.6.0-b09, mixed mode)
[q.yang@localhost Download]$
CHANGE DEFAULT JDK TO SUN INSTEAD OF OPEN JDK [2]
----------------------------------------------
[q.yang@localhost ~]$ source /etc/profile.d/sunjava.sh
[q.yang@localhost ~]$ echo $PATH
/usr/java/default/bin:/usr/java/default/bin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/bin:/usr/bin:/home/q.yang/bin:/sbin:/usr/sbin:/opt/wx/2.8/bin:/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin:/opt/codeblocks20100721-svn/bin/:/home/q.yang/CodeSourcery/arm-2010q1/bin:/opt/codeblocks20100721-svn/bin:/home/q.yang/EclipseCDT/eclipse
[q.yang@localhost ~]$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)
[q.yang@localhost ~]$ cat /etc/profile.d/sunjava.sh
export JAVA_HOME=/usr/java/default
export PATH=$JAVA_HOME/bin:$PATH
Friday, August 5, 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment