Steps and FAQs for installing JDK1.6 on Centos

Source: Internet
Author: User
Centos Install JDK step and FAQs 1. uninstall the built-in JDK 2 in the system before installation, download the required JDK Version from the JAVA official website 3. go to the character interface and use the root permission www.2cto. com1mkdir/usr/local/jdk-& gt; create and install...
Steps and FAQs for installing JDK on Centos 1. uninstall the built-in JDK 2 before installation, download the required JDK version on the JAVA website 3, and go to the character interface, and use root permissions www.2cto.com 1 mkdir/usr/local/jdk-> to create the installation directory 2 3cp jdk-6u33-linux-x64.bin/usr/local/jdk-> Copy the installation file 4 5cd/usr/local/jdk --> convert to installation directory 6 7 chmod + x jdk-6u33-linux-x64.bin-> Add execution permission 8 www.2cto.com 9. /jdk-6u33-linux-x64.bin-> execute the installation file 4, configure the environment variable 1vim/etc/profile --> edit the environment variable configuration file, add the following code to the end of the File: 1 # set java environment 2 export JAVA_HOME =/usr/lo Cal/jdk1.6.0 _ 333 export CLASSPATH = $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar: $ JAVA_HOME/jre/lib/rt. jar4export PATH = $ PATH: $ JAVA_HOME/bin5export JRE_HOME = $ JAVA_HOME/jre5, use the configuration file to take effect 1 source/etc/profile6, test the installation result www.2cto.com 1 shell> # java-version2java version "1.6.0 _ 33" 3 java (TM) SE Runtime Environment (build 1.6.0 _ 33-b04) 4 Java HotSpot (TM) 64-Bit Server VM (build between 8-b03, mixed mode) 5 6 shell> # javac -Version7javac 1.6.0 _ 33: the above test result indicates that JDK1.6 has been successfully installed on the local machine! If www.2cto.com 1 shell> # java-version2bash: java: command not found is not linked, create a new link 1 shell> # ln-s/usr/local/jdk/jdk1.6.0 _ 33/bin/java/usr/bin/java2shell> # ln-s/usr/ local/jdk/jdk1.6.0 _ 33/bin/javac/usr/bin/javac author Dapeng

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.