Ubuntu 14.04 Installation JDK 8,ubuntu14.04

Source: Internet
Author: User


Ubuntu 14.04 Installation JDK 8,ubuntu14.04


The first step is to download the Linux version of the JDK

Can be downloaded by visiting the Oracle website or directly from the command line.

[Email protected]:~$ wget-c http://download.oracle.com/otn-pub/java/jdk/8u11-b12/jdk-8u11-linux-i586.tar.gz
Step two, unzip the installation
[Email protected]:~$ mkdir-p/usr/lib/jvm[email protected]:~$ sudo mv Jdk-8u11-linux-i586.tar.gz/usr/lib/jvm[email  protected]:~$ cd/usr/lib/jvm[email protected]:~$ sudo tar xzvf jdk-8u11-linux-i586.tar.gz[email protected]:~$ sudo ln-s Jdk1.8.0_11 java-8
Step three, set the environment variables

Add environment variables to the system, primarily path, classpath, and Java_home.

[Email protected]:~$ VI ~/.BASHRC

Add at the end of the document

Export Java_home=/usr/lib/jvm/java-8export Jre_home=${java_home}/jreexport classpath=.:${java_home}/lib:${jre_ Home}/libexport Path=${java_home}/bin: $PATH

Save the exit and use the command to make the script effective:

[Email protected]:~$ Source ~/.BASHRC
Fourth step, configure the default JDK version

In some systems will be preinstalled OPENJDK, the system is the default use of this, rather than just loaded. So this step is to notify the system using Oracle's JDK, non-openjdk.

[Email protected]:~$ sudo update-alternatives--install/usr/bin/java java/usr/lib/jvm/java-8/bin/java 300[email protected]:~$ sudo update-alternatives--install/usr/bin/javac javac/usr/lib/jvm/java-8/bin/javac 300[email protected]:~$ sudo update-alternatives--config java

Because I am installing Ubuntu 14.04 in a virtual machine, OPENJDK is not installed by default, so there is no need to select the JDK version. If the Ubuntu version is installed on a physical machine, there are several candidates that can be used to replace Java (providing/usr/bin/java).

Select the path priority state------------------------------------------------------------0/usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 Auto mode 1/usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode \* 2/usr/lib/jvm/java-6-sun/bin/java 300 manual mode \# to maintain current value Press ENTER, or type the number of your choice: 2update-alternatives: Use/usr/lib/jvm/java-8/bin/java to provide/usr/bin/java (Java) in manual mode.
Fifth step, test verification
[Email protected]:~$ java-versionjava Version "1.8.0_11" Java (TM) SE Runtime Environment (build 1.8.0_11-b12) Java HotSpot (TM) Client VM (build 25.11-b03, Mixed mode)


Ubuntu installation JDK failed

I remember that the downloaded JDK is not available for immediate decompression, it is an executable file that needs to be run
You unzipped the java-jdk-1.8.0, but your java_home is jdk1.7.0_40.
Compress Package Contents:
The correct JDK is constructed:



Ubuntu1404 Installation

I also like you, installed the two systems, under the Windows7, I divided the 60G space to Ubuntu, I use UltraISO software to burn Ubuntu installation files to the U disk, and then in the BIOS setup from the USB stick boot, with a USB stick to the computer to install Ubuntu. This is the way I installed Ubuntu. In order to get into the installed Ubuntu, I also installed EASYBCD under Windows7. For me, if you want to install the latest Ubuntu system, the way is to format the Ubuntu space under Windows7, and then use EASYBCD to clear the Ubuntu startup items, so that completely removed the old Ubuntu. To install the new, you also have to burn the Ubuntu ISO file to a USB flash drive, boot the BIOS setup USB drive, and then mount the system from the USB stick.


Ubuntu 14.04 Installation JDK 8,ubuntu14.04

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.