linux下如何设置jdk?
来源: 互联网 发布时间:2015-09-26
本文导语: 下了一个,怎么设置环境变量? | 假设JDK安装在/home/jdk1.4.0/下,打开/etc/profile,在其中加入: PATH='/home/jdk1.4.0/bin:$PATH" CLASSPATH=.:/home/jdk1.4.0/jre/lib/rt.jar:/home/jdk1.4.0/lib/tools.jar export PATH CLASSPATH 修...
下了一个,怎么设置环境变量?
|
假设JDK安装在/home/jdk1.4.0/下,打开/etc/profile,在其中加入:
PATH='/home/jdk1.4.0/bin:$PATH"
CLASSPATH=.:/home/jdk1.4.0/jre/lib/rt.jar:/home/jdk1.4.0/lib/tools.jar
export PATH CLASSPATH
修改后,重启系统,ok!
PATH='/home/jdk1.4.0/bin:$PATH"
CLASSPATH=.:/home/jdk1.4.0/jre/lib/rt.jar:/home/jdk1.4.0/lib/tools.jar
export PATH CLASSPATH
修改后,重启系统,ok!
|
如上
还要设置
JAVA_HOME=/home/jdk1.4.0
export PATH CLASSPATH JAVA_HOME
还要设置
JAVA_HOME=/home/jdk1.4.0
export PATH CLASSPATH JAVA_HOME
|
假设你的jdk安装在/usr/java/j2sdk1.4.1/,
export PATH=/usr/java/j2sdk1.4.1/bin:$PATH
export PATH=/usr/java/j2sdk1.4.1/bin:$PATH