How to install and configure JDK in linux

Source: Internet
Author: User
How to install and configure JDK in linux 1. install and create the installation directory, create an installation path under/usr/java, and obtain the file to this path: www.2cto.com # mkdir/usr/java1, jdk-6u11-linux-i586.bin this is a self-extracting file, installed on linux as follows :#...
How to install and configure JDK in linux 1. install and create the installation directory, create an installation path under/usr/java, and obtain the file to this path: www.2cto.com # mkdir/usr/java 1, jdk-6u11-linux-i586.bin this is self-extracting files, installed on linux as follows: # chmod 755 jdk-6u11-linux-i586.bin #. /jdk-6u11-linux-i586.bin (note that this step must be in the directory where the jdk-6u11-linux-i586.bin is located) jdk is decompressed after prompted to enter yes. A line appears: Do you aggree to the above license terms? [Yes or no] the installer asks if you are willing to comply with the license agreement you just saw. Of course you have to agree. enter "y" or "yes" and press enter. 2, if the use of jdk-6u11-linux-i586-rpm.bin this is also a self-extracting file, but after decompression of the file is a jdk-6u11-linux-i586-rpm package, run the rpm command installed on linux can be. Install as follows: # chmod 755./jdk-6u11-linux-i586-rpm #./jdk-6u11-linux-i586-rpm. bin # rpm-ivh jdk-6u11-linux-i586-rpm appears a line of words: Do you aggree to the above license terms? [Yes or no] the installer asks if you are willing to comply with the license agreement you just saw. Of course you have to agree. enter "y" or "yes" and press enter. The installation software automatically installs JDK under the/usr/java/directory. 2. configure # add the following content to vi/etc/profile: export JAVA_HOME =/usr/java/jdk1.6.0 _ 27 export JAVA_BIN =/usr/java/jdk1.6.0 _ 27/binexport PATH = $ PATH: $ JAVA_HOME/binexport CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jarexport JAVA_HOME JAVA_BIN path classpath takes effect immediately after the/etc/profile file is modified. you can run the following command :#. /etc/profile note :. and/etc/profile have spaces. java-version: java version "jdk1.6.0 _ 02" Java (TM) 2 Runtime Environment, Standard Edition (build jdk1.6.0 _ 02) Java HotSpot (TM) client VM (build jdk1.6.0 _ 02, mixed mode)
 
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.