Installation and configuration of the JDK

Source: Internet
Author: User

Brief introduction:

Java is an object-oriented programming language that can compose cross-platform applications. The JRE (Java Runtime Environment) is a collection of environments necessary to run Java programs, including the JVM standard implementation and the Java Core Class library. The JDK (Java Development Kit) is the Java Language Software Development Kit (SDK), the core of the entire Java, including the Java Runtime Environment JRE, Java Tools, and the Java base Class library. So if you want to compile a Java program you have to install and configure the JDK, if you just want to allow Java programs, you only need to install the JRE. Installing and configuring the JDK is also the first step in learning Java, and I'll install the JDK in the Windows7 operating system below.

The basic components included in the JDK include:

javac– compiler, turn source program into bytecode jar– package tool, package related class file into a file

javadoc– Document generator, extracting documents from source notes

Jdb–debugger, error-checking tool

java– running the compiled Java program (. class suffix)

Appletviewer: Applet browser, a Java browser that executes Java applets on HTML files.

Javah: Generates a C procedure that can invoke a Java procedure, or a header file that can be called by a Java program.

The Javap:java disassembler, which displays the accessible functionality and data in the compiled class file, shows the meaning of the byte code.

Jconsole:java Tools for system commissioning and monitoring

Download:

Download the JDK to the Oracle website (http://www.oracle.com/)

I'm using the JDK1.6 version here (HTTP://PAN.BAIDU.COM/S/1JHV7GHG)

To install the JDK:

1. Double-click to open the JDK installation program we downloaded

2. Click "Next"

3, modify the default installation path, of course, you can not modify, click "Change"

4. Change to the directory you want to install, then click OK. I changed the "D:\Java\jdk1.6.0_30\" here.

5, click "Next", this time the program began to install

6, install JRE, click "Change" to modify the installation path, this is set to "D:\Java\jre6\", then click "OK", click "Next"

7. Click "Finish" to finish the installation.

8, after the installation will pop up a registration screen page, we do not have to ignore him, directly close

To configure the JDK environment variable:

1. Right click on "Computer" on the desktop, click "Properties"

2. Click on "Advanced system Settings"

3. Click "Environment Variables"

4. Click "New" to add a new environment variable

5, fill in the variable name "Java_home", the variable value is the JDK installation path, namely: "D:\Java\jdk1.6.0_30", and then click "OK"

6, a new environment variable named "CLASSPATH", the variable value is ".; %java_home%\lib;%java_home%\lib\tools.jar "

7. We find the variable named "Path", then click "Edit", add "%java_home%\bin;" in front of the variable value, notice that there is a semicolon behind it.

8, the above steps have been done after the click "OK", configure the JDK environment variable to complete this

Test configuration is correct:

After we have configured the JDK, we usually test whether it is configured correctly, so we will take the following steps:

1. Click Start Menu--run (or press the shortcut key directly: win+r) Note: If you do not have "run", you can refer to step 2

2, "Select" If you perform step 1 found that there is no "run" then look at this, otherwise directly ignore the step, directly see step 3

Some Win7 systems are not "running" because of setup problems, we just need to do the following steps to set up:

3. Enter "cmd" and press Enter or click "OK"

4, we enter the "Java", "Javac", "Java-version" the three commands, and press ENTER, if this happens, the installation and configuration is correct. The steps to install and configure the JDK are now complete!

5. If " is not an internal or external command, or a program or batch file that can be run. ", then the configuration failed, please re-follow the above serious of the do it again.

Environment variables:

An environment variable is an object with a specific name in the operating system that contains the information that one or more applications will use.

For example, the PATH environment variable in Windows and DOS operating systems, when the system is required to run a program without telling it the full path of the program, in addition to the current directory in the search for this program, but also in path specified in the path to find. The user can run the process better by setting the environment variables.

Configuring JDK-related environment variables
Variable name Variable Value Note
Java_home JDK installation directory, e.g. "D:\Java\jdk1.6.0_30" Don't fill in the wrong
CLASSPATH .; %java_home%\lib Notice that there's a dot and semicolon in front
PATH %java_home%\bin; The environment variables for windows are separated by semicolons in English.

Summarize:

JDK installation and configuration for beginners a bit of difficulty, this is learning Java must pass a process, but when familiar with the installation and configuration process will no longer feel difficult, so everything starts difficult, as long as good practice several times, you can master the proficiency.

Installation and configuration of the JDK

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.