Ubuntu14.04LTS install OracleJDK1.8

Source: Internet
Author: User
(1) download JDKhttp: // www.oracle.com/technetwork/cn/java/javase/downloads/index.html (2) extract (3) create a jvm file (4) and move it to/usr/lib/jvm (Note: If no jvm file exists, although this statement will automatically create a jvm file, it will only put all the files in jdk1.8.0 _ 25 in the jvm, instead of putting jdk1.8

(1) download JDK

Http://www.oracle.com/technetwork/cn/java/javase/downloads/index.html

(2) Extract

(3) create a jvm File

(4) Move to/usr/lib/jvm

(Note: If there is no jvm file, running this statement will automatically create the jvm file, but it will only put all the files in jdk1.8.0 _ 25 into the jvm, instead of placing the jdk1.8.0 _ 25 and its files in the jvm file, the two are different)

(5) set JDK Environment Variables

(Also in ~ /. Bashrc modified, the difference is:

The setting method of/etc/profile is valid for all login users.

~ /. Bashrc is only valid for the current user

)

(6) Make the modification take effect immediately

You can enter env to check whether JAVA_HOME is successfully configured.

(7) Verify JDK

(8) set to default

Enter sudo update-alternatives -- display java to view the default jdk information. The error message "no alternatives for java" is displayed at the beginning.

Sudo update-alternatives -- install/usr/bin/java: Your JDK path/java 300 (priority)

Sudo update-alternatives -- install/usr/bin/javac your JDK path/javac 300 (priority)

If you have multiple versions and need to modify the default version, enter

Sudo update-alternatives -- config java

Sudo update-alternatives -- config javac

A prompt will be displayed: to maintain the current value [*], please press the Enter key or enter the selected number

Enter the priority (300) and press Enter.

Enter display to check the default version.

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

Ubuntu 14.04 install JDK8 http://www.linuxidc.com/Linux/2014-09/106218.htm

Install JDK graph analysis http://www.linuxidc.com/Linux/2014-09/107291.htm under Ubuntu

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-11/109216.htm

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.