vi /etc/profile
按“s”键,变成insert模式
#set java environment
JAVA_HOME=/u01/zftomcat-Linux64-yxxt/jdk6
export TOMCAT_HOME=/u01/zftomcat-Linux64-yxxt
CLASSPATH=.:$JAVA_HOME/lib/tools.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH PATH
按“esc”
按“:”
wq