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

JDK Environment Variable And Change default JDK

时间:2014-04-30 23:18:44      阅读:386      评论:0      收藏:0      [点我收藏+]

标签:class   java   c   t   sp   ble   re   date   port   ash   path   

Environment Variable :

 

change(import) /etc/bashrc

    export JAVA_HOME=/software/jdk1.8.0

    export PATH=$JAVA_HOME/bin:$PATH

    export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

save and exit.

 

Change default JDK:

    update-alternatives --install /usr/bin/java java /software/jdk1.8.0/bin/java 300

    update-alternatives --install /usr/bin/javac javac /software/jdk1.8.0/bin/javac 300

    update-alternatiives --config java

    [and then you can choose jdk version.]

    

Test :

    terminal: java -version

JDK Environment Variable And Change default JDK,布布扣,bubuko.com

JDK Environment Variable And Change default JDK

标签:class   java   c   t   sp   ble   re   date   port   ash   path   

原文地址:http://www.cnblogs.com/hualongbei/p/3701262.html

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