Ubuntu14.04 install JDK 8

Source: Internet
Author: User
Notes on the JDK8 installation process under Ubuntu14.04, I hope to help you. Check whether jdk-related software is installed. Run the following java command: # If the prompt is apt-getinstall & lt; selected software package & gt;, the system is not installed by default. Www.linuxidc.com @ linuxidc :~ $ Java-version Download source code and decompress: www.linuxidc.com @ linuxidc :~ $ Wge

Install JDK 8 in Ubuntu 14.04.

Check whether jdk-related software is installed in the system. You can directly enter the java command:

# If the prompt is: apt-get install <选定的软件包> Is not installed by default.
Www.linuxidc.com @ linuxidc :~ $ Java-version

Download the source code and decompress it:
Www.linuxidc.com @ linuxidc :~ $ Wget
Junluobj @ junluobj :~ $ Sudo mkdir/usr/lib/jvm
Www.linuxidc.com @ linuxidc :~ $ Tar zvxf jdk-8u20-linux-x64.tar.gz
Www.linuxidc.com @ linuxidc :~ $ Sudo mv jdk1.8.0 _ 20 // usr/lib/jvm/

Set JDK environment variables:
Www.linuxidc.com @ linuxidc :~ $ Sudo vim ~ /. Profile
# Set jdk env
Export JAVA_HOME =/usr/lib/jvm/jdk1.8.0 _ 20/
Export JRE_HOME =/usr/lib/jvm/jdk1.8.0 _ 20/jre
Export CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar: $ JAVA_HOME/lib: $ JRE_HOME/lib: $ CLASSPATH
Export PATH = $ JAVA_HOME/bin: $ PATH

# Save and exit. Enter the following command to make it take effect immediately.
Www.linuxidc.com @ linuxidc :~ $ Source ~ /. Profile

Verify JDK:
Www.linuxidc.com @ linuxidc :~ $ Java-version
Java version "1.8.0 _ 20"
Java (TM) SE Runtime Environment (build 1.8.0 _ 20-b26)
Java HotSpot (TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

If openjdk has been installed in the system, follow these steps to update it:
Www.linuxidc.com @ linuxidc :~ $ Sudo update-alternatives -- install/usr/bin/java/usr/lib/jvm/jdk1.8.0 _ 20/bin/java 300
Update-alternatives: using/usr/lib/jvm/jdk1.8.0 _ 20/bin/java to provide/usr/bin/java (java) in auto mode
Www.linuxidc.com @ linuxidc :~ $ Sudo update-alternatives -- install/usr/bin/javac/usr/lib/jvm/jdk1.8.0 _ 20/bin/javac 300
Update-alternatives: using/usr/lib/jvm/jdk1.8.0 _ 20/bin/javac to provide/usr/bin/javac (javac) in auto mode
Www.linuxidc.com @ linuxidc :~ $ Sudo update-alternatives -- config java
Www.linuxidc.com @ linuxidc :~ $ Sudo update-alternatives -- config javac

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

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-09/106218.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.