Installing Oracle JDK on Ubuntu Linux

Source: Internet
Author: User

Description:Because many systems do not support the use of OPENJDK, it is necessary to install Oracle JDK under Ubuntu. While the installation of Oracle JDK does not seem to provide the apt way, so the way to install Oracle JDK is relatively troublesome, I often install, in order to facilitate others at the same time to check, write it down. First step: differentiate between 32-bit or 64-bit operating systemsFirst determine whether your Ubuntu Linux is 32-bit or 64-bit, a lot of methods, here is a description. $uname-A Step Two: Uninstall OpenJDKRun the following command to see if OPENJDK is installed, and if it is already installed, the Java information will be displayed. $java-version (as shown below, the current system is not installed in any Jdk,ubuntu System package already has OPENJDK, can be installed directly openjdk) under Ubuntu system, you can also run the following command: sudo apt-cache Search Java If OPENJDK is installed, it can be uninstalled as follows: $sudo Apt-get purge openjdk-\* step three: Install Oracle JDK

Use the following command to install, just some time, it will download a lot of files, and you want to make sure that your network environment is good:

1     sudo add-apt-repository ppa:webupd8team/java2     sudo apt-get update 3     sudo Install oracle-java8-installer4     sudoinstall Oracle-java8-set-default

If you want to install Java 7 (i.e Java 1.7), use JAVA7 instead of java8 in the command above.

The process is as follows:

Update may fail due to network causes, multiple update times succeeded

Installing Oracle JDK on Ubuntu Linux

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.