Java JDK Environment Configuration and description

Source: Internet
Author: User

First, Java program operating mechanism

Programs written in the Java language need to be compiled to generate platform-independent bytecode (. class files ).

This bytecode must use the Java Interpreter (JVM) to interpret execution.

The JVM is a virtual machine that can run Java bytecode files, converting bytecode into machine code execution for a particular system.

Second, the JDK installation directory under the file and its role

1, Bin: This path holds the various tools of the JDK command, Common Java,javac and other commands placed in the path

2. DB: This path is the path where Java db is installed

3. Include: some platform-specific header files

4. JRE: The JRE environment required to run the Java program Lock is installed under this path

5, Lib: This path is stored in the JDK tool command of the actual execution program

Note: The Javac.exe command is written in Java, and this class is the main class under the Sun/tools/javac path in the Tools.jar file under the Lib path.

The Javac.exe command under the bin path of the JDK is actually just wrapping up the Java class

The vast majority of commands under the bin path are packaged in the tool class in the Tools.jar file.

6, Javafx-src.zip is the source code of all core class library of Java FX

7, Src.zip is the source code of all Java Core Class library

8, Readme and license and copyright, etc. for illustrative documents

Third, configure environment variables

Although the computer already has the JDK installed, and the JDK installation path contains the Java and javac two commands,

But the computer does not know where to look for these two commands.

The Windows operating system looks for commands based on the PATH environment variable

Note: JDK1.5 or more versions of JDK, you can not set the CLASSPATH variable

The purpose of the original CLASSPATH environment variable is to tell the JRE to search for Java classes under this path

JDK1.5 above will automatically search for class files under the current path, and when using Java's compile and run tools,

The system can automatically load Java classes in Dt.jar and Tools.jar files.

Java JDK Environment Configuration and description

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.