Install jdk http://blog.csdn.net/hzqnju/article/details/6779556
Windows: set java_home: View JDK installation PATH java-version: View JDK version linux: whereis javawhich java (java execution PATH) echo $ JAVA_HOMEecho $ PATH
2. Configure the linux environment variables as follows: (remember source. bash_profile) 1. modify the/etc/profile file (global users) vi. Add this file/etc/profile to the end of the profile file: export JAVA_HOME =/usr/share/jdk1.6.0 _ 20 export PATH = $ JAVA_HOME/bin: $ PATHexport CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar2. modify. bash_profile file (a user is authorized to use these environment variables ). add: export JAVA_HOME =/usr/share/jdk1.6.0 _ 20 export PATH = $ JAVA_HOME/bin: $ PATHexport CLASSPATH =.: $ JAVA_HOME/lib/d T. jar: $ JAVA_HOME/lib/tools. run the following command on the jar3.shell terminal: (for temporary use) export JAVA_HOME =/usr/share/jdk1.6.0 _ 14 export PATH = $ JAVA_HOME/bin: $ PATHexport CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar 3. uninstall jdk and find the _ uninst subdirectory of the jdk installation directory. Execute the command on the shell terminal. /uninstall. sh to uninstall jdk.