Manual installation of Java JDK under ubuntu14.04

Source: Internet
Author: User

ubuntu14.04 manual installation of Java JDK the first step: Download the jdk.tar.gz (assuming that the downloaded file name is jdk.tar.gz) Step two: Extract sudo tar-zxvf. Jdk.tar.gz here will be in the current directory will be to a new extracted folder (JDK-8XXX), here is assumed to be the folder called JDK Step three: Move the extracted folder sudo MKDIR/USR/LIB/JVM  New Folder Jvmsudo mv./jdk/usr/lib/jvm/java Fourth Step: Modify the environment variable sudo gedit/etc/environment if the file has not been modified before, there should be only one line (the second line after this modification), if so, After this modification there will be three lines to add the first line javahome= "/usr/lib/jvm/java" is added before the last quotation mark in the second line:/usr/lib/jvm/java/bin:/usr/lib/jvm/java/jre/bin   The second line is modified to this form: path= "****:/usr/lib/jvm/java/bin:/usr/lib/jvm/java/jre/bin" where xxxx is the contents of the double quotes before you, avoid the complete copy of this form to add the third line: Classpath= ".:/ Usr/lib/jvm/java/lib:/usr/lib/jvm/java/jre/lib "Use environment variables now: source/etc/environment Other work: Then set the default JDK, Because the system default may exist other JDK in Terminal execution command: sudo update-alternatives--install/usr/bin/java java/usr/lib/jvm/java/bin/java 300sudo Update-alternatives--install/usr/bin/javac Javac/usr/lib/jvm/java/bin/javac 300 Select system default JDK, execute command at Terminal: sudo Update-alternatives--config Java If there is only one Java environment then there will be a prompt system with only one JDK final execution command: java-version

  

Install Java JDK manually under ubuntu14.04

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.