sudo gedit /etc/profile export JAVA_HOME=/usr/java/jdk1.7.0_05 export PATH=$JAVA_HOME/bin:$PATH export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar source /etc/profile