INFO: How Does the Virtual Machine Search for Java Classes?

ID: Q177168


The information in this article applies to:


SUMMARY

This article talks about how the Microsoft virtual machine (Microsoft VM) searches for a class on the local machine and Web site.


MORE INFORMATION

When a class is requested, the Microsoft VM normally searches for it in the following order:

  1. Check all explicitly specified locations (typically supplied with the jview /cp command-line option, not applicable for applets).


  2. Check the locations specified in the HKLM\Software\Microsoft\Java VM\DevClasspath registry entry.

    NOTE: this registry entry is provided for development and testing, and may not be supported in a future release. Microsoft does not recommend relying on it for production purposes.


  3. Search packages in the Java Package Manager (JPM) marked as system (see notes below) packages.


  4. Check the locations specified in the HKLM\Software\Microsoft\Java VM\TrustedClasspath registry entry.


  5. Check the directory specified by the HKLM\Software\Microsoft\Java VM\TrustedLibsDirectory registry entry.


  6. Check the locations specified in the HKLM\Software\Microsoft\Java VM\Classpath registry entry.


  7. Check the directory specified by the HKLM\Software\Microsoft\Java VM\LibsDirectory registry entry.


  8. Check the locations specified in the CLASSPATH environment variable.


  9. Search packages in the JPM marked as non-system (see notes below) packages. Searching first for non-system classes in the specified namespace, then searching for non-system classes in no namespace (global namespace).


  10. If served from a Web page, the Microsoft VM additionally searches the following locations:



  11. Search the code base of the HTML.


Notes

Here are the requirements for a package installed into the JPM to be considered as system packages:


REFERENCES

Further information about the Java Package Manager can be found at the following Web site:

http://www.microsoft.com/java/
For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, see the following pages on the Microsoft Technical Support site:
http://support.microsoft.com/support/visualj/

http://support.microsoft.com/support/java/

Additional query words: search order class jpm


Keywords          : kbIE400 kbIE401 kbSDKJava200 kbSDKJava201 kbSDKJava300 kbSDKJava310 kbSDKJava202 JVM jcab 
Version           : WINDOWS:2.0,2.01,2.02,3.0,3.1,4.0
Platform          : WINDOWS 
Issue type        : kbinfo 

Last Reviewed: July 26, 1999