Install JDK in Ubuntu and set it to the default JDK

Source: Internet
Author: User
Install JDK 1.6 in Ubuntu and set it as the default JDK. download the Liunx JDK in Windows, and I will download the jdk-6u43-linux-i586.bin2. upload JDK to Ubuntu3. manually install JDK through secureCRT (I installed JDK under/usr/local/bin/jdk1.6.0 _ 43): repair first... install JDK 1.6 in Ubuntu and set it to the default JDK 1. download the Liunx JDK in Windows, my jdk-6u43-linux-i586.bin2. upload JDK to Ubuntu3. manually install JDK through secureCRT (I installed under/usr/local/bin/jdk1.6.0 _ 43): first modify the permission sudo chmod u + x jdk-6u43-linux-i586.bin to install sudo-s. /jdk-6u43-linux-i586.bin4. configure environment variables to open profi Le file sudo nano/etc/profile add # author ylchou # date 2013-06-23export JAVA_HOME =/usr/local/bin/jdk1.6.0 _ 43 export CLASSPATH = "at the bottom of the file ".: $ JAVA_HOME/lib: $ CLASSPATH "export PATH =" $ JAVA_HOME/: $ PATH "5. manually set the system default JDK and enter the following commands on the terminal: sudo update-alternatives -- install/usr/bin/java/usr/local/bin/jdk1.6.0 _ 43/bin/java 300 sudo update-alternatives -- install/usr/bin/javac javac/usr/local/bin/jdk1.6.0 _ 43/bin/javac 300sud O update-alternatives -- install/usr/bin/jar/usr/local/bin/jdk1.6.0 _ 43/bin/jar 300 sudo update-alternatives -- install/usr/bin/javah javah/usr/local/bin/jdk1.6.0 _ 43/bin/javah 300 sudo update-alternatives -- install/usr/bin/javap/usr/local/bin/jdk1.6.0 _ 43/ bin/javap 300 and then execute the following code to select the JDK version we have installed: sudo update-alternatives -- config java6. verify that JDK is installed successfully. Restart the Shell terminal and run "java-version". if you enter the following command, the installation is successful: java version "1.6.0 _ 43" Java (TM) SE Runtime Environment (build 1.6.0 _ 43-b01) Java HotSpot (TM) Client VM (build phases 14-b01, mixed mode, sharing)
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.