Update Java version under Ubuntu

Source: Internet
Author: User

1. Under the official website to update the Java version of the Jdk2.mov to the previous installation path, such as/USR/LIB/JDK/3. Change path, modify the Javahome path in ~/.BASHRC. 4.Update default JDK

# update-alternatives--install/usr/bin/java Java/usr/lib/jvm/jdk1.8.0_05/bin/java 300

# update-alternatives--install/usr/bin/javac Javac/usr/lib/jvm/jdk1.8.0_05/bin/javac5. Restart, why not direct source, because the original Java path still exists. 5.java-versionattached: Linux Java installation method

install SUN-JAVA6-JDK
download Jdk-6u45-linux-x64.bin put it in the shared directory

  sudo mkdir / usr /lib/" Span style= "FONT-SIZE:12.0PT; Font-family:calibri; Color: #262626 ">jdk

./jdk-6u45-linux-x64.bin

sudomv jdk1.6.0_45/usr/lib/jdk

  sudoVI ~/.BASHRC(Individual users)or/etc/BASH.BASHRC(System Users),Add

  export java_home=/ usr /lib/ jdk /jdk1.6.0_45

Export jre_home=${java_home}/ JRE

Export Classpath=.:${java_home}/lib:${jre_home}/lib

Export Path=${java_home}/bin: $PATH
Select the version to use after installation;sudo update-alternatives--config javaRemember to change the path of Javahome.///usr/lib/jvm/java-7-openjdk-amd64



Null

Update Java version under Ubuntu

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.