分享

Install Oracle Java (JDK) 6 / 7 / 8 in Ubuntu 13.04

 horse_home 2014-04-27

Oracle Java has been removed from the official Ubuntu repositories due to the new Java license. If you need to use Oracle Java instead of OpenJDK in Ubuntu, this simple tutorial will show you how to install Oracle Java (JDK which includs JRE) 6 / 7 / 8 in Ubuntu 13.04 using the ppa repository.

The Webupd8 Team created a ppa with packages which automatically downloads Oracle Java JDK from its official website and installs it on your computer. They are oracle-java6-installer, oracle-java7-installer, and oracle-java8-installer. The ppa supports for Ubuntu 13.04, 12.10, 12.04 and 10.04.

To get started, hit Ctrl+Alt+T to open a terminal window for running commands.

Remove OpenJDK first if installed by this command:

sudo apt-get purge openjdk*

Then add the Webupd8 Team PPA repository and then reload the packages:

sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

Now, install Oracle Java:

sudo apt-get install oracle-java7-installer

Or, change the number 7 to 6 or 8 to install Java6 or Java8.

After installation, run command to check if it was successful:

java -version

It should return something like this:

java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) Client VM (build 23.7-b01, mixed mode)

(Optional) To remove Oracle Java, run this command in terminal (change the package name to yours):

sudo apt-get remove oracle-java7-installer

Enjoy!

facebooktwittergoogle_plus

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多