加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-12 14:10:03 所属栏目:百科 来源:网络整理
导读:http://tipsonubuntu.com/2016/07/31/install-oracle-java-8-9-ubuntu-16-04-linux-mint-18/ Quick tutorial for beginners how to easily install Oracle Java JDK8 or JDK9 in Ubuntu 16.04 or Linux Mint 18 via PPA. Webupd8 Teamis maintaining a PPA r

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

Quick tutorial for beginners how to easily install Oracle Java JDK8 or JDK9 in Ubuntu 16.04 or Linux Mint 18 via PPA.

Webupd8 Teamis maintaining a PPA repository with installer scripts for the latest Java 8 and 9,that automatically downloads 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 may replace oracle-java8-installer withoracle-java9-installerto install Java 9.

While the install process,you 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 packageoracle-java9-set-defaultinstead.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读