How To Install a Distribution Unit or Java ZIP File into the JPM with Rundll32 (232642)



The information in this article applies to:

  • Microsoft SDK for Java 3.0
  • Microsoft SDK for Java 3.0 Preview 1
  • Microsoft SDK for Java 3.1
  • Microsoft SDK for Java 3.2
  • Microsoft virtual machine

This article was previously published under Q232642

SUMMARY

This article explains how to install Java packages into the Java Package Manager (JPM), without the aid of a download tool, such as Internet Explorer.

MORE INFORMATION

To install a package into the JPM from the command line, using the Rundll32 interface, first put it into a standard ZIP file or a CAB file with an Open Software Distribution (OSD) manifest. Here is a brief explanation of the OSD specification from the Microsoft Developer Network (MSDN):

Software distribution. Recently Microsoft and Marimba co-authored and submitted a specification to the Worldwide Web Consortium (W3C) called Open Software Description (OSD) that describes the delivery of software applications over the Internet. OSD uses unique XML tags to describe software components, including their versions, underlying structure, relationships to other components, and dependencies. It can describe and reference platform-native code (such as Macintosh, Win32, or ActiveX components) as well as Java packages and applications.

Next, use the JPM Rundll32 interface as follows.

NOTE: An alias in %windir%\Downloaded Program Files is created only while installing a CAB file with an OSD, and not while installing a ZIP file. But in both the cases, a ZIP file with a mangled name will be created in %windir%\java\packages as expected. This ZIP file contains the package being installed. %windir% here represents the Windows directory. Replace System32 by System in the example below while using Windows 95/98.
rundll32 %windir%\System32\msjava.dll,JavaPkgMgr_Install <filename>,
<file type>,<hi version>,<lo version>,<build>,<package flags>,
<install flags>,<namespace>

File Type:
0=CAB
1=ZIP

Package Flags:
0=System class
1=Non system class
2=Needs trusted source

Install Flags:
1=No version check
2=No signer check
4=Autodetect packages
8=Delete input file

A sample command line might look like :

rundll32 %windir%\System32\msjava.dll,JavaPkgMgr_Install myclasses.zip,1,4,79,2151,0,12

				

Modification Type:MinorLast Reviewed:7/1/2004
Keywords:kbFAQ kbhowto KB232642