Install JDK under Ubuntu

Source: Internet
Author: User
  1. Download jdk:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html from official website

  2. Copy the JDK package jdk-8u31-linux-x64.gz to the/USR/LIB/JVM directory, unpack: Tar zxvf jdk-8u31-linux-x64.gz

  3. Configure environment variables under the ~/.bash_profile file:

    # JDK Configuration
    Export java_home=/usr/lib/jvm/jdk1.8.0_31
    Export JRE_HOME=${JAVA_HOME}/JRE
    Export Classpath=.:${java_home}/lib:${jre_home}/lib
    Export Path=${java_home}/bin: $PATH

  4. To make an environment variable effective:

    SOURCE ~/.bash_profile

  5. Use the Javac,java command to check if the configuration is successful, and check that the version is correct by Java-version.

This article is from the "It Bit Growth" blog, please make sure to keep this source http://linuxzp.blog.51cto.com/3614757/1616079

Install JDK under 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.