Install Oracle JDK 14.04 on Ubuntu 1.8 LTS

Source: Internet
Author: User

Install Oracle JDK 14.04 on Ubuntu 1.8 LTS

(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 In Ubuntu (with Clojure download)

Install JDK 12.04 in Ubuntu

CentOS6.3 install JDK and environment Configuration

Install JDK 8 on Ubuntu 14.04

Install JDK graph analysis in Ubuntu

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.