Install Oracle Java 8/9 in Ubuntu 16.04, Linux Mint 18

Source: Internet
Author: User
Tags linux mint

http://tipsonubuntu.com/2016/07/31/install-oracle-java-8-9-ubuntu-16-04-linux-mint-18/

Quick Tutorial for Beginners The easily install Oracle Java JDK8 or JDK9 in Ubuntu 16.04 or Linux Mint via PPA.

WEBUPD8 team are maintaining a PPA repository with installer scripts for the latest Java 8 and 9, that automatically Downlo Ads The Java archive from Oracle website and sets up everything for you.

1. Add the PPA.

Open Terminal (CTRL+ALT+T) and run the command:

sudo add-apt-repository Ppa:webupd8team/java

Type in your password when it asks and hit Enter.

2. Update and install the installer script:

Run commands to update System Package index and install Java Installer script:

sudo apt update; sudo apt install Oracle-java8-installer

You could replace Oracle-java8-installer with Oracle-java9-installer to install Java 9.

While the install process is have to accept Java license to continue downloading & installing Java binaries.

3. Check the Java version

To check the Java version after installing the package, Run command:

Javac-version

4. Set Java Environment variables

The PPA also contains a package to automatically set Java environment variables, just run command:

sudo apt install oracle-java8-set-default

For Java 9, install the package Oracle-java9-set-default instead.

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.