Ubuntu Kylin Installation jdk-8u45-linux-i586.tar.gz

Source: Internet
Author: User

Mobile sister, your installation method can be tested before sharing out, this is a very irresponsible sharing attitude!

Here's what I did 2 hours later:


1 ) will jdk-8u45-linux-i586.tar.gz copied to /opt/sinoknots/ below the directory, if the folder is not available, create the folder with the following command:


// Create Sinoknots folder


sudo mkdir/opt/sinoknots


// copied to Sinoknots folder


sudo cp-r jdk-8u45-linux-i586.tar.gz/opt/sinoknots


2 ) will jdk-8u45-linux-i586.tar.gz Unzip:


// extract to current directory


sudo tar-zxvf jdk-8u45-linux-i586.tar.gz


"This step will give you a table of contents: jdk1.8.0_45 "


3 ) to set the environment variables, using the gedit Open /etc/profile file


// Open File


sudo gedit/etc/profile


// At the end of the file, add the following text


Export java_home=/opt/sinoknots/jdk1.8.0_45


Export jre_home=/opt/sinoknots/jdk1.8.0_45/jre


Exportpath= $JAVA _home/bin: $JAVA _home/jre/bin: $PATH


Exportclasspath= $CLASSPATH:.: $JAVA _home/lib: $JAVA _home/jre/lib


4 ) to set the system default JDK change it. [ This step is important, if not modified, will cause the configured environment variable to not take effect ]


sudo update-alternatives--install/usr/bin/java java/opt/sinoknots/jdk1.8.0_45/bin/java 300


sudo update-alternatives--install/usr/bin/javac javac/opt/sinoknots/jdk1.8.0_45/bin/javac 300

This step you will choose the JDK environment in effect, of course, choose your own installed

sudo update-alternatives--config java


sudo update-alternatives--config javac


5 ) detection, input java-version


Java Version "1.8.0_45"

Java (TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot (TM) Server VM (build 25.45-b02, Mixed mode)




Ubuntu Kylin Installation jdk-8u45-linux-i586.tar.gz

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.