Install jdk in Linux and jdk in Linux
1. Delete the built-in jdk in linux (to keep the system clean or not delete it)
The Complete identification system has been deleted.
2. Download JDK and select the appropriate JDK version as needed.
Address: http://www.oracle.com/technetwork/java/javase/downloads/index.html
3. install and configure
I copied the jdk from another machine, so I need to use the scp command to copy the file to the machine to be installed, and then execute the installation.
Edit the profile file and configure Environment Variables
Export JAVA_HOME =/usr/java/jdk1.7.0 _ 67 export PATH = $ JAVA_HOME/bin: $ PATHexport CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tool. jar
4. Verify
Enter java-version in the terminal, and the version information is marked to be correctly installed. Enter javac. The information is displayed normally and the environment variables are correctly configured. If the environment variable does not take effect immediately, run source/etc/profile