1.linux System Installation ORACLEJDK

Source: Internet
Author: User

This section will show you how to install Oracle JDK in Linux instead of open JDK

1. Download the JDK to Oracle website: http://www.oracle.com/technetwork/java/javase/downloads/index.html

2. Unzip the JDK TAR-XVF jdk-8-linux-i586.tar.gz (32-bit) tar-xvf jdk-8-linux-x64.tar.gz (64-bit) or simply use the Unzip tool to freely

3. Move the extracted files to/usr/lib

sudo mkdir-p/USR/LIB/JVM  ---Create a new JVM folder
sudo mv  ./jdk1.8.0/usr/lib/jvm/---To move the JDK folder to/usr/lib

4. Enter the command on the command line as follows

Atives--install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0/bin/java" 1
sudo update-alternatives--install "/usr/bin/javac" "Javac" "/usr/lib/jvm/jdk1.8.0/bin/javac" 1
sudo update-alternatives--install "/usr/bin/javaws" "Javaws" "/usr/lib/jvm/jdk1.8.0/bin/javaws" 1

The following 1 represents the priority, and subsequent installations replace the currently installed version as the default version

5. Give permission

sudo chmod a+x/usr/bin/javasudo chmod a+x/usr/bin/javacsudo chmod a+x/usr/bin/javawssudo chown-r root:root/usr/lib/jv m/jdk1.8.0

6. List all JDK versions of the current system installation, select a run, and if the JDK is installed for the first time, the current JDK will be run

sudo update-alternatives--config javasudo update-alternatives--config javacsudo update-alternatives--config javaws




Reference URL: Http://askubuntu.com/questions/56104/how-can-i-install-sun-oracles-proprietary-java-jdk-6-7-8-or-jre

1.linux System Installation ORACLEJDK

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.