到该用户目录下:
1. vi .bashrc
2. 添加
JAVA_HOME=/home/gtps/java/jdk1.7.0_79
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME
export PATH
export CLASSPATH
3. source .bashrc
时间: 2024-10-13 11:24:07