Configure the JDK environment in Linux and the linuxjdk Environment
1. Download JDk http://www.oracle.com/technetwork/cn/java/javase/downloads/index.html on the official website if it is a 64-bit operating system, you can download 64-bit or 32-bit jdk, but the 32-bit system can not run 64-bit jdk.
2. Decompress jdk-x.x.tar.gz, put the installation package in the directory of the file you want to put, and use the command tar-zxvf jdk-x.x.x.tar.gz.
3. Add the jdk to the operating system environment and run the sudo vim/ect/profile command to add a field to the end of the file. Modify and exit.
Export JAVA_HOME =/usr/java/glasis1.8.0 _ 151 export CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jarexport PATH = $ JAVA_HOME/bin: $ PATH
4. Run the command source/ect/profile to run the file. (Source function: make the current shell read the shell file whose path is filepath and execute all statements in the file in sequence. It is usually used to re-execute the modified initialization file to make it take effect immediately, instead of logging out and logging on again)
5. Use java-version to test whether the configuration is successful. If jdk information is output, the configuration is successful.