Microsoft SDK for Java

Creating and Using Distribution Units

Distribution units (DUs) provide a new way of distributing software that is supported by the code download feature of Microsoft® Internet Explorer version 4.0 or later. Traditionally, Java software distribution has been inefficient. You would archive classes in a .zip file, and then archive the .zip in another .zip file along with any documentation or other included files. Users would unpack the first archive (but not the second), add the included .zip to a path, set their class path, and reboot.

DUs make this approach unnecessary. A distribution unit is a cabinet file (.cab) that contains an Open Software Distribution manifest (OSD) file (also known as a Distribution Unit Profile [DUP]), as well as content files. The OSD manifest file, which is written in XML, contains details on the version of the DU, the contents and their versions, and installation instructions for the Java Package Manager (JPM). The DUs must still be created with a hierarchical directory, as with augmented cabinet files, but installation requirements are handled by Internet Explorer and the JPM. The distribution is provided through an HTML <APPLET> tag and useslibrary parameters.

The Microsoft SDK for Java includes a utility, dubuild, that writes the OSD file and places it in a cabinet file archive with any specified contents. The dubuild utility is similar to cabarc, but uses the OSD manifest instead of .inf files.

Because DUs written with dubuild (the OSD manifest in particular) are not recognized by earlier versions of Internet Explorer, creating DUs for Internet Explorer 3.0 is more involved. You can follow the Master.inf template and procedures as you would for creating a cabinet file, then add the .inf to your package, and finally use the dubuild utility to package it. By default, the dubuild utility uses LZX compression, but Internet Explorer 3.0 uses MSZIP compression. Use the /Z command-line option to build DUs with MSZIP compression.

Although this section focuses specifically on using dubuild to distribute and install Java packages with the Microsoft Java Package Manager, dubuild is a general distribution standard; it can be used to distribute applications, libraries, and native code.

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