Linux 環境變數設定

醉面韋陀發表於2010-07-02
path: /etc/profile.d/java.sh
#set java environment
export JAVA_HOME=/usr/java/jdk1.5.0_22 
export JRE_HOME=/usr/java/jdk1.5.0_22/jre 
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH 
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH

path:/etc/profile.d/ant.sh
#set ant environment
export ANT_HOME=/usr/ant/apache-ant-1.7.1 
export PATH=$PATH:$ANT_HOME/bin

path:/etc/profile.d/maven.sh
#set maven environment
export M2_HOME=/usr/maven/apache-maven-2.0.11
export M2=/usr/maven/apache-maven-2.0.11/bin/
export MAVEN_OPTS="-Xms256m -Xmx512m"
export PATH=$M2:$PATH

 

相關文章