how set java en
Apr 24, 2012
2:47:24 PM: [email protected] - Yi Yang YY Dai/China/Contr/IBM: Download the jdk file e.g. jdk.tgz
tar zxvf jdk.tgz to extract the tgz file
Change to root user
Create a new file named java.sh using vi /etc/profile.d/java.sh
input the next in the java.sh
#set java env
JAVA_HOME=<path to the jdk>
CALSSPATH=.:$JAVA_HOME/lib/tool.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH PATH
wq to save and quit
Restart the system
In the terminal input java -version to check if successful
Note there is no space in the java.sh file
2:47:24 PM: [email protected] - Yi Yang YY Dai/China/Contr/IBM: Download the jdk file e.g. jdk.tgz
tar zxvf jdk.tgz to extract the tgz file
Change to root user
Create a new file named java.sh using vi /etc/profile.d/java.sh
input the next in the java.sh
#set java env
JAVA_HOME=<path to the jdk>
CALSSPATH=.:$JAVA_HOME/lib/tool.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH PATH
wq to save and quit
Restart the system
In the terminal input java -version to check if successful
Note there is no space in the java.sh file
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.