Microsoft SDK for Java

Using the Java Package Manager with Development Tools

When a Java package is installed in the JPM, the original archive file is removed and the classes are stored internally. You must use the clspack tool to generate the .zip files used by Java development tools. This tool enables you to take packages that are installed through the JPM and write their contents into a .zip file.

The easiest way to use clspack is to type the following command:

clspack –auto

This will create a single classes.zip in your %Windir%\Java\Classes directory that contains all classes stored in the JPM. The jvc compiler, which is in the Microsoft SDK for Java, looks for classes in this directory by default so you don't need to change your CLASSPATH environment variable.

If you're using a compiler that doesn't check this directory by default, set your CLASSPATH environment variable as follows:

set CLASSPATH=%WINDIR%\Java\Classes\Classes.zip

Extracting Individual Packages from the Java Package Manager

The clspack tool can also extract individual packages. Use the following command:

clspack myzipfile.zip <listfile>

The listfile parameter specifies the name of a text file containing the list of packages to extract to the . zip file.

Listing Currently Installed Packages

Use the -dump option with clspack to create a list of all packages currently installed in the package manager in the specified output file as follows:

clspack -dump <outputfile>

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