Java Dynamic Management Kit 3.2 Programming Guide
[ Previous ][ Fast Back ]Chapter 13. Class and Library Loading Service[ Fast Forward ][ Next ]

Class and Library Server

The class and library server serves classes and libraries to the class loader and the library loader. It is provided as the Java class com.sun.jaw.impl.server.rmi.NetClassServerImpl. It works in conjunction with the RMI network class loader provided with the Java Dynamic Management Kit.

The supplied server runs as a stand-alone Java program. However, it is implemented as an m-bean. This enables it to be integrated with a Java Dynamic Management agent and managed through the AdaptorMO interface.


Note - The class and library server does not support JAR files or ZIP files.


Starting the Class and Library Server

To start the server, type this command:
java [options] com.sun.jaw.impl.server.rmi.NetClassServerImpl 

If there is no RMI registry running on the machine where the server is started, the server starts the registry and registers itself.

Options

You can specify the following system properties:

-DDEBUG

Specifies that debug messages are printed.

-Dclasspath=classpath

Specifies the search path for Java classes. The directories in this search path must not contain .jar or .zip files. By default it is the current directory.

-Dlibpath=libpath

Specifies the search path for libraries. By default it is the current directory.

-Dport=portno

Specifies the port number for RMI access. By default it is 1099.

-Dservice=servicename

Specifies the service name for registering the server object with the RMI registry. By default it is NetClassServer.

-Ddirfile=directivefile

Specifies the code signing directive file to be used.

Example

In the example shown in Example 13-1, trace messages are printed and Java classes are searched for in the /project/netman/mbeans and /project/servman/mbeans directories.

Example 13-1. Starting the Class and Library Server
java
-DDEBUG
-Dclasspath=/project/netman/mbeans:/project/servman/mbeans
com.sun.jaw.impl.server.rmi.NetClassServerImpl

Retrieving and Updating Search Paths

When you start the server, you have to specify the search paths for locating:

These paths can be retrieved and updated dynamically, either by using the RMI interface defined by the server, or by using the AdaptorMO interface if the server is integrated with a Java Dynamic Management agent.

Code Signing Directive File

The directive file is a properties file that defines the following properties:

For further information, see the keytool documentation provided with JavaŽ 2 SDK.

Implementing a Class and Library Server

Any class and library server you implement must implement the com.sun.jaw.impl.server.rmi.NetClassServer interface.


[ Previous ][ Home ][ Next ]
Class and Library Loading Service[ Up ]Class and Library Loader