码迷,mamicode.com
首页 > 其他好文 > 详细

Debian install jdk7

时间:2014-06-16 00:28:43      阅读:201      评论:0      收藏:0      [点我收藏+]

标签:class   java   tar   set   linux   app   

1. download jdk

jdk-7u60-linux-x64.tar.gz

2. unzip jdk-file to /usr/lib/jvm/.

/usr/lib/jvm/jdk1.7.0_60

3. set environment

vi /etc/profile, add
#set java environment
export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_60
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH

4. enable profile

execute
source /etc/profile
to enable java environment

5. set default app

update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_60/bin/java 17060

update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_60/bin/javac 17060

update-alternatives --config java

6. check the installation with:
java -version

Debian install jdk7,布布扣,bubuko.com

Debian install jdk7

标签:class   java   tar   set   linux   app   

原文地址:http://www.cnblogs.com/babe/p/3784264.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!