具体添加内容如下:
export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_45
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=$PATH:${JAVA_HOME}/bin:${JRE_HOME}/bin
export ANDROID_HOME=/home/emporia/CTS/android-sdk-linux
export PATH=$PATH:$ANDROID_HOME:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
export ANT_HOME=/opt/apache-ant-1.9.4
export PATH=$PATH:${ANT_HOME}/bin
执行source指令后立即生效,但重启后就不生效了,求助求助。
1
Oishi 2015-05-06 16:28:36 +08:00
我一般都是建一个文件放在/etc/profile.d/目录下
cat /etc/profile.d/jdk.sh export J2SDKDIR=/usr/lib/jvm/java-8-oracle export J2REDIR=/usr/lib/jvm/java-8-oracle/jre export PATH=$PATH:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin export JAVA_HOME=/usr/lib/jvm/java-8-oracle export DERBY_HOME=/usr/lib/jvm/java-8-oracle/db |
2
jamesxu 2015-05-06 16:55:09 +08:00
login 和 non-login shell 的区别,如果是 non-login shell 就不会读取 /etc/profile,一般终端软件可以设置的
|