Ubuntu delete openjdk install SunJDK

Source: Internet
Author: User
Ubuntu delete openjdk install SunJDK1. download the installation package to the official website: jdk-7-linux-i586.tar.gz2. create the installation directory: sudomkdir/usr/lib/jvm3. decompress: tarzxvf. /jdk-7-linux-i586.tar.gz-C/usr/lib/jvm4. set the environment variable :... ubuntu delete openjdk install Sun JDK 1. download the installation package to the official website: jdk-7-linux-i586.tar.gz2. create the installation directory: sudo mkdir/usr/lib/jvm3. decompress: tar zxvf. /jdk-7-linux-i586.tar.gz-C/usr/lib/jvm4. set environment variable: vim ~ /. Bashrc export JAVA_HOME =/usr/lib/jvm/jdk-7 export JRE_HOME =$ {JAVA_HOME}/jre export CLASSPATH =.: $ {JAVA_HOME}/lib :$ {JRE_HOME}/lib export PATH =$ {JAVA_HOME}/bin: $ PATH to close the terminal, reopen sudo update-alternatives -- install/usr/bin/java/usr/lib/jvm/jdk-7/bin/java 300 sudo update-alternatives -- install/usr/bin/javac javac/usr/lib/jvm/jdk-7/bin/javac 300 update-alternatives -- config java display: select path priority status ready * 0/usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 automatic mode 1/usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode 2/usr/lib/jvm/java-6-sun/jre/bin/java 63 enter the selected number in manual mode: 2 Press Enter 4. verify that the java-version has been changed to sun's jre restart sudo update-alternatives -- install/usr/bin/java/home/wv/soft/jdk1.6.0 _ 41/bin/java 300 sudo update-alternatives -- install/usr/bin/javac/home/wv/soft/jdk1.6.0 _ 41/bin/javac 300 sudo update-alternatives -- config java

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.