Centos-6.3-x86_64minimal mini edition installation notes-Java

Source: Internet
Author: User
1, yum install jdk16yumlistjava-160-openjdk * yuminstalljava-160-openjdkx86_64-y download jdkwgethttp: downloadoraclecomotn-pubjavajdk7u13-b20jdk-7u13-1, yum install jdk1.6 # yum list java-1.6.0-openjdk. * # yum install java-1.6.0-openjdk.x86_64-y download jdk # wget http://download.oracle.com/otn-pub/java/jdk/7u13-b20/jdk-7u13-linux-x64.tar.gz # Sudo tar-vzxf jdk-7u13-linux-x64.gz-C/usr/lib/jvm/2, modify the version, select the best JDK # alternatives -- config java3 and set JAVA_HOME ***************************** * *********************************** differences between the three configuration methods ** **************************************** * ******************* 1) currently Logged In valid export JAVA_HOME =/usr/lib/jvm/jre-1.6.0-openjdk.x86_64 export PATH = $ JAVA_HOME/bin: $ PATH export CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/ Tools. jar 2) is valid for a user (not tested) and edited in the user directory. bashrc file, add: set JAVA_HOME =/usr/lib/jvm/jre-1.6.0-openjdk.x86_64 export JAVA_HOME set PATH = $ JAVA_HOME/bin: $ PATH export PATH set CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar export CLASSPATH 3) is valid for all users (most popular) open/etc/profile in a text editor and add: # vi/etc/profile ********************************** * ************************ JAVA_HOME =/usr/lib/jvm/jd K1.7.0 _ 13 PATH = $ JAVA_HOME/bin: $ path classpath =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar export JAVA_HOME export PATH export CLASSPATH must be logged on again to be valid. 4. test whether the test is effective: echo $ JAVA_HOME $ echo $ PATH $ echo $ CLASSPATH $
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.