Microsoft KB Archive/177168

From BetaArchive Wiki
Knowledge Base


Article ID: 177168

Article Last Modified on 11/14/2005



APPLIES TO

  • Microsoft Internet Explorer 4.01 128-Bit Edition
  • Microsoft Internet Explorer 4.0 128-Bit Edition
  • Microsoft Internet Explorer 4.01 128-Bit Edition
  • Microsoft Internet Explorer 4.0 128-Bit Edition
  • Microsoft Java Virtual Machine
  • Microsoft Software Development Kit for Java 2.02
  • Microsoft Software Development Kit for Java 2.01
  • Microsoft Software Development Kit for Java 2.02
  • Microsoft Software Development Kit for Java 3.0
  • Microsoft Software Development Kit for Java 3.1



This article was previously published under Q177168

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.

  1. Search packages in the Java Package Manager (JPM) marked as system (see notes below) packages.
  2. Check the locations specified in the HKLM\Software\Microsoft\Java VM\TrustedClasspath registry entry.
  3. Check the directory specified by the HKLM\Software\Microsoft\Java VM\TrustedLibsDirectory registry entry.
  4. Check the locations specified in the HKLM\Software\Microsoft\Java VM\Classpath registry entry.
  5. Check the directory specified by the HKLM\Software\Microsoft\Java VM\LibsDirectory registry entry.
  6. Check the locations specified in the CLASSPATH environment variable.
  7. 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).
  8. If served from a Web page, the Microsoft VM additionally searches the following locations:


    • Any cabinet files referenced by the Cabinets applet parameter (in the order in which they appear in the HTML). If there is a Cabinets applet parameter, the Cabbase parameter and the Archive attribute (below) will not be searched.
    • The cabinet file referenced by the Cabbase applet parameter. If there is a Cabbase applet parameter, the Archive attribute (below) will not be searched.
    • Any zip or jar file referenced by the 'archive' attribute of the applet tag.
  1. Search the code base of the HTML.

Notes

  • The contents of the registry values for items 2, 4, and 6 and the environment variable in item 8 should contain a semi-colon-delimited list of directories, zip files, and/or jar files. Multiple entries will be searched in the order they appear. The registry values for items 5 and 7 may only specify a single directory.
  • The Java Package Manager (JPM) is a service used by the Microsoft VM to store and retrieve Java classes.
  • Classes loaded by steps 1-8 above are considered system classes. Classes loaded by steps 9-11 are considered non-system classes. Non-system classes are not loaded by the system class loader, but instead are loaded by an instance of a Java ClassLoader. Non-system classes are not global and will not interact with other non-system classes loaded by a different ClassLoader. All the standard packages installed with the Microsoft VM are system packages.
  • When a class is loaded by an untrusted caller from one of the specified locations and it is only safe for use by a trusted caller, an exception may occur when trying to call a method or access a member of the class.

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

  • Must reside in the global namespace.
  • Must be signed with full permissions.
  • The .osd inside the installation CAB must specify the <SYSTEM/> tag for each package. If using the DUBUILD tool to create the CAB file, use the /S command line switch to specify system packages.


REFERENCES

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

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:


Additional query words: search order class jpm

Keywords: kbinfo KB177168