Two JRE "and" three Lib "functions simple main explanation

Source: Internet
Author: User

After installing the JDK, there are JDK and JRE two folders in the Java directory, but there is a JRE folder under the JDK, and this JRE has more server folders than the previous JRE in the bin directory!
Ordinary users can install the JRE. The developer needs to install the JDK, which includes the JRE. So the JRE directory is included in the JDK directory. The two JRE is roughly the same, with subtle differences.
Two sets of JRE are for different job responsibilities! Different JRE is responsible for the contents of the respective scopes.
When the user only needs to execute the Java program, then the C:\Program files\java\jre1.5.0_08 JRE is OK!
When the user is a Java programmer, the Java development environment is required. At compile time, the system will take precedence to find the "Java, Javac" directories under C:\Program Files\java\jdk1.5.0_08\bin or the JRE of their parent directory. That is, the JRE under the JDK is running under the development environment.

Again, three Lib directories:
The Lib under the JDK includes the jar package for the Java development environment, which is for the JDK, such as some tools under the JDK that might be used for files in that directory. For example, compilers, and so on.
Lib under the JRE is just a jar package that runs Java programs and is used for the JVM runtime. Includes all the standard class libraries, and extension classes.
The Lib under the JRE under the JDK is the jar package required by the runtime in the development environment. The most typical is the imported external drive jar package. Because at compile time, the system is looking for the JRE under the JDK. Instead of the outermost JRE.
-----------------------------------------
Finally, I'll add a few points here:
1. Classpath,eclipse that do not need to be specified when using eclipse will search by themselves.
2. The JRE under the standalone directory is a generic JRE, which is optional when installed (it overwrites the existing version). The JRE under the JDK directory is required. If you specify the path to the JDK in eclipse (the path of the JRE is not specified, you will find it yourself), then this is the JRE. Java, Web, start, etc., use the generic JRE.

Two JRE "and" three Lib "functions simple main explanation

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.