# 将java写入环境变量 echo export JAVA_HOME=/opt/smartvideo/cms/jdk1.7.0_25>>/etc/profile echo export PATH=$JAVA_HOME/bin:$PATH>>/etc/profile echo export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar>>/etc/profile source /etc/profil