您当前的位置: 首页 > 学无止境 > 心得笔记 网站首页心得笔记
Tomcat系列之java技术详解
发布时间:2019-07-18 17:51:40编辑:雪饮阅读()
安装jdk
环境:redhat6.4xi386
[root@localhost src]# chmod +x ./jdk-6u21-linux-i586-rpm.bin
[root@localhost src]# ./jdk-6u21-linux-i586-rpm.bin
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
inflating: jdk-6u21-linux-i586.rpm
inflating: sun-javadb-common-10.5.3-0.2.i386.rpm
inflating: sun-javadb-core-10.5.3-0.2.i386.rpm
inflating: sun-javadb-client-10.5.3-0.2.i386.rpm
inflating: sun-javadb-demo-10.5.3-0.2.i386.rpm
inflating: sun-javadb-docs-10.5.3-0.2.i386.rpm
inflating: sun-javadb-javadoc-10.5.3-0.2.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 Sun products, services and training
* Access to early releases and documentation
Product and system data will be collected. If your configuration
supports a browser, the Sun Product Registration form for
the JDK 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.....
在最后出现这个网络连接可以直接ctrl+c终止即可
环境变量配置
[root@localhost src]# cat /etc/profile.d/java.sh
export JAVA_HOME=/usr/java/jdk1.6.0_21
export PATH=$PATH:$JAVA_HOME/bin
[root@localhost src]# chmod +x /etc/profile.d/java.sh
[root@localhost src]# /etc/profile.d/java.sh
配置完成
[root@localhost src]# java -version
java version "1.7.0_09-icedtea"
OpenJDK Runtime Environment (rhel-2.3.4.1.el6_3-i386)
OpenJDK Client VM (build 23.2-b09, mixed mode)
注意:这里显示的就有问题,我安装的是1.6却显示的是1.7,写该文的时候当时没有太在意,后来在redhat5.8上也遇到类似的事情了这才注意到该问题并非偶然,说明系统本来就有自带的,所以此时要将自带的java卸载掉并重新source下刚才的sh脚本(个人理解直接执行也可以,但是我这里使用的是source)
关键字词:java,jdk,环境变量