Centos installation and configuration JDK toolkit tutorial

Source: Internet
Author: User
Tags centos netbeans


When installing NetBeans in Centos for development, you will be prompted to install the java jdk, especially the latest version of NetBeans requires jdk 1.7 and later.

1. Download the installation file

Download jdk-7u72-linux-x64.rpm files on sun official website.

2. Installation


[Sun @ localhost Downloads] $ sudo cp jdk-7u72-linux-x64.rpm/usr/local/
[Sun @ localhost local] $ sudo rpm-ivh jdk-7u72-linux-x64.rpm

3. Configure the environment


[Sun @ localhost Downloads] $ sudo vim/etc/profile

Enter at the end of the file

JAVA_HOME =/usr/java/jdk1.7.0 _ 72
JRE_HOME =/usr/java/jdk1.7.0 _ 72/jre
PATH = $ PATH: $ JAVA_HOME/bin: $ JRE_HOME/bin
CLASSPATH =: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar: $ JRE_HOME/lib
Export JAVA_HOME JRE_HOME PATH CLASSPATH

4. Make the modification take effect immediately. Check the jdk Version.


[Sun @ localhost local] $ source/etc/profile
[Sun @ localhost local] $ java-version
Java version "1.7.0 _ 45"
OpenJDK Runtime Environment (rhel-2.4.3.3.el6-x86_64 u45-b15)
OpenJDK 64-Bit Server VM (build 24.45-b08, 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.