The following are the notes for installing JDK1.8.0 _ 25 and configuring environment variables in Ubuntu14.04. 1. source code package preparation: first download jdk and supervisor from the official website.
The following are notes about installing JDK 1.8.0 _ 25 on Ubuntu 14.04 and configuring environment variables.
1. source code package preparation:
First, download jdk and supervisor from the official website.
2. decompress the source code package.
Create a java folder in the/usr/local directory on the terminal and run the following command:
2. decompress the source code package.
Create a java folder in the/usr/local directory on the terminal and run the following command:
Sudo mkdir/usr/local/java
Copy the downloaded package to the java folder and run the following command:
Go to the directory where the jdk source code package is located
Cp jdk-8u25-linux-x64.tar.gz/usr/local/java
Go to the java directory and run the following command:
Cd/usr/local/java
Decompress the package and run the following command:
Sudo tar xvf jdk-8u25-linux-x64.tar.gz
Then you can delete the compressed package. command line:
Sudo rm jdk-8u25-linux-x64.tar.gz
3. Set jdk Environment Variables
The global setting method is used, which is an environment variable shared by all users.
$ Sudo gedit ~ /. Bashrc
As shown in:
Open and add at the end
Export JAVA_HOME =/usr/local/java/jdk1.8.0 _ 25
Export JRE_HOME =$ {JAVA_HOME}/jre
Export CLASSPATH =. :$ {JAVA_HOME}/lib :$ {JRE_HOME}/lib
Export PATH =$ {JAVA_HOME}/bin: $ PATH
Remember, do not add spaces on both sides of the equal sign during the above process. Otherwise, "invalid identifiers" will appear, because unnecessary spaces cannot be identified during source/etc/profile, it is understood as part of the path.
Save the settings.
4. Check whether the installation is successful.
Enter the following command on the terminal:
Java-version
Check whether the installation is successful
The result is as follows:
Ubuntu installation JDK and environment variable configuration http://www.linuxidc.com/Linux/2013-01/78221.htm
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-01/112030.htm