Linux: Linuxx64/Ubuntu14.04JavaJDK version: jdk-8u65-linux-x64.tar.gz1. Go to the Oracle official website to download the latest version of JavaJDK: http://www.oracle.com/technetwork/java/javase/downloads/index.html, download to downloadsfolder. 2. Create a file in a proper path
Operating System: Linux x64/Ubuntu 14.04
Java JDK version: jdk-8u65-linux-x64.tar.gz
1. Go to the Oracle official website to download the latest version of Java JDK: http://www.oracle.com/technetwork/java/javase/downloads/index.html, and download it to the downloadsfolder.
2. Create a folder in the appropriate path to store Java JDK. In this example, create a new JVM sub-folder under the/opt directory. The operations are as follows:
Open Terminal (the last is T1) and enter:
Cd/opt # Go to the opt directory
Sudo mkdir jvm # create a jvm folder
Ls # display successfully created jvm folder
Cd jvm # enter the jvm folder
3. Copy the downloaded JDK compressed package to the jvm directory. The operations are as follows:
Create another Terminal window (T2) and enter:
Cd Downloads # enter the Downloads folder
Ls # display the downloaded JDK file,
Sudo cp jdk-8u65-linux-x64.tar.gz/opt/jvm # copy the file to the newly created jvm folder (here change the file name to your corresponding JDK version, later the same)
Sudo rm jdk-8u65-linux-x64.tar.gz # Delete the installation package in the local directory (optional)
4. Unzip and install Java JDK and configure environment variables. The operations are as follows:
Return to the first Terminal (T1) and enter:
Ls # display the copied JDK installation package
Sudo tar-zxvf jdk-8u65-linux-x64.tar.gz # unzip the installation package
Ls # display the decompressed JDK folder and the original installation package
Sudo rm jdk-8u65-linux-x64.tar.gz # delete original installation package
Sudo gedit/etc/profile # Open the profile file under the etc directory
5. configure global environment variables. The operations are as follows:
Add the JDK installation path at the end of the opened profile document (Please confirm carefully ):
# Set java environment
Export JAVA_HOME =/opt/jvm/jdk1.8.0 _ 65
Export JRE_HOME =$ {JAVA_HOME}/jre
Export CLASSPATH =.: $ JAVA_HOME/lib: $ JRE_HOME/lib: $ CLASSPATH
Export PATH = $ JAVA_HOME/bin: $ JRE_HOME/bin: $ PATH
6. Save and close the document. (Note: You can also run the vim command to edit etc/profile, open the command: sudo vim/etc/profile, and press Key to enter the editing mode, Key to exit the editing mode, and then press ":" and then enter "wq! "Save and exit; enter" q! "Do not save and Exit)
7. Enable configuration and verify. In Terminal, enter:
Java-version
8. If the display effect is similar to the following, the operation is successful:
Java version "1.8.0 _ 65"
Java (TM) SE Runtime Environment (build 1.8.0 _ 65-b17)
Java HotSpot (TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
Build http://www.linuxidc.com/Linux/2015-01/111974.htm of Java Development Environment under Ubuntu 14.04
Install JDK 7 (with Clojure download) http://www.linuxidc.com/Linux/2012-10/71557.htm under Ubuntu
Install JDK1.7 http://www.linuxidc.com/Linux/2012-06/62239.htm in Ubuntu 12.04
CentOS6.3 install JDK and environment configuration http://www.linuxidc.com/Linux/2012-09/70780.htm
Ubuntu14.04 64-bit installation JDK1.7 http://www.linuxidc.com/Linux/2015-01/111102.htm
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2
This article permanently updates the link address: Http://www.linuxidc.com/Linux/2015-12/126928.htm