Ubuntu14.04 configuration JavaSEjdk-7u55

Source: Internet
Author: User
In Ubuntu14.04 configure the JavaSEjdk-7u55, JDK is currently the latest version of the jdk-8u5, this time does not choose to install the latest JDK 8, but to install the highest version of JDK 7 jdk-7u55. First, go to the official website to download jdk-7u55, address: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

In Ubuntu 14.04 to configure the Java SE jdk-7u55, JDK is currently the latest version of the jdk-8u5, this time does not choose to install the latest JDK 8, but to install the highest version of JDK 7 jdk-7u55.

First, go to the official website to download jdk-7u55, address: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

Recommended reading:

Ubuntu 14.04Download, install, configure related knowledge http://www.linuxidc.com/Linux/2014-04/100370.htm

Ubuntu 14.04: Http://www.linuxidc.com/Linux/2014-04/100352.htm

Ubuntu 14.04 text tutorial on hard drive installation in Windows 7Http://www.linuxidc.com/Linux/2014-04/100369.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

Select Accept License Agreement, select the corresponding version to download, Ubuntu select tar.gz compressed package, 64-bit select x64, 32-bit select i586.

After the end of the compressed package: jdk-7u55-linux-x64.tar.gz, unzip and then configure the can be used, do not need to install. I decompress the package to the home directory, and the terminal executes: tar-zxvf jdk-7u55-linux-x64.tar.gz-C ~ /,-C is the directory to be decompressed. Folder: jdk1.7.0 _ 55

Next, set the environment variable and run sudo gedit/etc/environment on the terminal.

Add the jdk bin directory after the existing PATH variable. Use a colon to separate it from the existing variable.

Then add the CALSSPATH and JAVA_HOME variables.

My situation is as follows:

PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: /usr/local/games:/home/tecn/jdk1.7.0 _ 55/bin"

CLASSPATH = "/home/tecn/jdk1.7.0 _ 55/lib:." note the following:

JAVA_HOME = "/home/tecn/jdk1.7.0 _ 55 /"

After setting, log off or restart to make the environment variable take effect!

Run java-version on the terminal to check whether the version is effective. The configured version is 7u55.

Now the configuration is complete. You can write a helloworld test.

Openjdk has been installed to enable the official jdk:

Run the following commands on the terminal:

Sudo update-alternatives -- install/usr/bin/java/home/tecn/jdk1.7.0 _ 55/bin/java 445

Sudo update-alternatives -- install/usr/bin/javac/home/tecn/jdk1.7.0 _ 55/bin/javac 445

Sudo update-alternatives -- config java

You will be prompted to maintain the current value [*], press the Enter key, or enter the selected number:

Enter the number of the item whose priority is 445, and press Enter.

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/2014-04/101038.htm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.