Ubuntu 14.04 Configuration Java SE jdk-7u55 (reprint)

Source: Internet
Author: User
Tags java se

Transferred from: http://blog.csdn.net/tecn14/article/details/24797545

JDK is currently the latest version of Jdk-8u5, this time did not choose to install the latest jdk8, but to install jdk7 the highest version of 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

Select Accept License agreement, select the corresponding version of the download, Ubuntu Select tar.gz compression package, 64-bit x64,32 choose i586.

After the completion of the compression package: jdk-7u55-linux-x64.tar.gz, decompression and configuration can be used, do not need to install. I unzip the home directory, terminal execution: TAR-ZXVF jdk-7u55-linux-x64.tar.gz-c ~/,-C after the directory to be extracted to. Get folder: jdk1.7.0_55

Next set environment variables, terminal execution: sudo gedit/etc/environment

Add the Bin directory of the JDK after the existing path variable, and note that the colon is separated from the existing variable

Add Calsspath and Java_home variables again

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:." Look, there's a point back there.
Java_home= "/home/tecn/jdk1.7.0_55/"

When set, log off or restart to make the environment variable effective!

Check whether the terminal executes: java-version, you can see that the version is just configured 7u55.

The configuration is complete and can be written under a HelloWorld test.

Already installed OPENJDK to enable the official JDK:

Terminal execution in turn:

sudo update-alternatives--install/usr/bin/java Java/home/tecn/jdk1.7.0_55/bin/java 445
sudo update-alternatives--install/usr/bin/javac 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 ENTER, or enter the selected number:

Enter the number of the item with the priority 445, enter it.


--------------------------------------------------------------------------------

Reprint Please specify:

Original address: http://blog.csdn.net/tecn14/article/details/24797545

--------------------------------------------------------------------------------

Ubuntu 14.04 Configuration Java SE jdk-7u55 (reprint)

Related Article

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.