
The Java language is firmly one of the first choices for network application languages. Today's Java has not only undergone substantial reforms in execution speed, but also has made many modifications and enhancements in content.

Java SE Runtime Environment basic class library
The basic class library that comes with RE is mainly the file JRElibrt.jar, which includes all class libraries of the Java2 platform standard version. Same version as JRE.
Net Framework core class library
The core class library of Net Framework is placed in the C:Winntassemblygac directory and placed in different directories according to different namespaces, unlike JRE which is bundled into one package. And different versions can exist at the same time, such as:
A certain class library version 1.0 C:Winntassemblygac name 1.0 name.dll
A certain class library version 1.1 C:Winntassemblygac name 1.1 name.dll
Although this is very flexible and can update the class library to the latest status at any time, it can easily bring complexity to version management and cause version inconsistency.
JRE search method
In JRE, ClassLoader is responsible for finding and loading the class libraries referenced by the program. The basic class library ClassLoader will be automatically loaded in rt.jar. For other class libraries, ClassLoader will search in the path specified by the environment variable CLASSPATH. According to the principle of first come, first come, place it in C The class library in front of LASSPATH is searched first. It is recommended to set the PATH and CLASSPATH environment variables before starting the Java program. The OS uses PATH to find the JRE and determines the location of the basic class library rt.jar. The JRE's ClassLoader uses CLASSPATH to find other class libraries. But sometimes there will be a situation where you want to replace the class library in the basic class library, then you can simply pass the -Djava.endrosed.path=... parameter to java.exe, so ClassLoader will use the class library with the path specified by the java.endrosed.path parameter before the basic class library. Therefore, Java version management is very simple and effective. It may be primitive, but it is easy to use, simple and not prone to errors. (So I'm very surprised why Eric Ramond criticized Java's class library management mechanism. He actually criticized Java's interface, which makes people question his understanding of Java)

















Useful
Useful
Useful