Installation of Oracle's JDK under Linux

Source: Internet
Author: User

When the Linux system is installed, it will bring its own openjdk1.xx.xx.

Uninstalling OPJDK
Download ORACLEJDK
Installing the JDK
Run validation
Some questions

Uninstalling OPJDK
    • Use Java-version if the version is as shown, you need to uninstall
    • Using Rpm-qa | The grep JDK can see which versions of the
    • Uninstalling using the Yum-y remove JDK information
    • OPENJDK Uninstall complete
Download ORACLEJDK
    • Download the JDK's compressed package using the wget name
      Oracle's JDK requires accept licence to download
      wget wget–no-check-certificate–no-cookies–header "Cookie:oraclelicense=accept-securebackup-cookie" http// Download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz
    • Unzip the JDK
      Use TAR-XZVF download link-c/usr/local
      Unzip to the/usr/local folder
Installing the JDK
    • Configuring the Environment
      At the end of the/etc/profile folder, add
      java_home=/usr/local/jdk1.8.0_131
      Path=java_home/bin
      Export PATH Java_home
Run validation
    • Java-version Version Verification
    • Compile validation

      Javac Hello.java
    • Run validation

      Java Hello
Some questions
    • Without OPENJDK, you can simply ignore the first step.
    • Run validation could not find the main class
      Most of the data in the configuration will be more than one classpath configuration, in fact, Classpath can not be configured, configuration after the Java command will appear to find the main class, delete the good.


Null

Installation of Oracle's JDK under 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.