Microsoft SDK for Java

Package Installation

Java classes installed on the class path can be used by any Java applet or application. In many cases, a small group of utility classes will be installed for only a few applications of a particular vendor, but because of current class path limitations, these classes will be visible to all applications. This means that the class path gets cluttered quickly with toolkits and libraries that are used for only a few applications.

The JPM allows packages to be installed in an application namespace where they are visible only to applications and applets running in the namespace. (Packages that must be visible to all applications, such as the system classes and Application Foundation Classes, are installed in the global namespace.) Only packages signed by the namespace's principal are allowed to be installed in the namespace. Applications that have classes in the anonymous package can run without the possibility of name conflicts with other installed applications. Without this protection, Java applications cannot be installed. Application namespaces give vendors the ability to install Java applets and applications in the Java Package Manager.

To run a Java applet or stand-alone application that is installed in an application namespace, you must specify the namespace when you run the applet or application. To specify an application namespace when running an applet, add the following parameter to the <APPLET> tag:

<PARAM NAME=namespace value="namespace">

To specify an application namespace for an application, use the -n option with the jview utility:

jview -n <namespace> <classname>

© 1999 Microsoft Corporation. All rights reserved. Terms of use.