The Java Virtual Machine must provide sufficient support for the implementation of the class libraries of the Java SE Platform. Some of the classes in these libraries cannot be implemented without the cooperation of the Java Virtual Machine.
Classes that might require special support from the Java Virtual Machine include those that support:
- Reflection, such as the classes in the package
java.lang.reflectand the classClass. - Loading and creation of a class or interface. The most obvious example is the class
ClassLoader. - Linking and initialization of a class or interface. The example classes cited above fall into this category as well.
- The module system, such as the class
ModuleLayer. - Multithreading, such as the class
Thread. - Weak references, such as the classes in the package
java.lang.ref.
The list above is meant to be illustrative rather than comprehensive. An exhaustive list of these classes or of the functionality they provide is beyond the scope of this specification. See the specifications of the Java SE Platform class libraries for details.