HOWTO: Install a Third Party Package on a User's Computer

ID: Q245696


The information in this article applies to:
  • Microsoft Visual J++, version 6.0
  • Microsoft SDK for Java, versions 3.0, 3.0 Preview 1, 3.1, 3.2, 4.0
  • Microsoft virtual machine


SUMMARY

This article illustrates how to install a third party package into the Java Package Manager (JPM) on a user's computer.


MORE INFORMATION

There are two ways to install your code on the local computer:

  • One way is to create a Distribution Unit(DU) using the Dubuild.exe utility in the SDK for Java. This utility creates a CAB file and includes an automatically generated .osd file. Please see the "References" section for more details on DUBUILD.
  • The other method to install code on the local computer is to use an .inf file. This also comes in handy for IE3.0x users.
Each of these methods have the advantage of downloading your code on the first visit to the page, and not requiring another download on subsequent visits unless a newer version becomes available. The methods do however require some permanent space on the user's local drive.

The following steps uses the DUBUILD approach to install the third party classes into the JPM.
  1. If your third party classes are packaged inside a JAR file, the first step would be to uncompress the JAR file to a ZIP file and then extract the zip file contents to a separate folder.


  2. Change to the folder where you have the third party package uncompressed.


  3. Use the following command lines to build your CAB:


  4. 
    dubuild installcab.cab . /D "Your Friendly Name" /N "Name Space"         /I *.class /V 1,1,1,1
    makecert -sk MyKeyName -n "CN=TestName" MyTestCert.cer
    cert2spc MyTestCert.cer MyTestCert.spc
    signcode -j javasign.dll -jp Low -spc MyTestCert.spc -k MyKeyName installcab.cab 
    The following is the HTML file that installs the third party classes into the Java Package Manager(JPM):
    
    <HTML>
    <APPLET> 
    <PARAM NAME="useslibrary" VALUE="Your Friendly Name">
    <PARAM NAME="namespace" VALUE="Name Space">
    <PARAM NAME="useslibraryversion" VALUE="1,1,1,1">
    <PARAM NAME="useslibrarycodebase" value="installcab.cab">
    </APPLET>
    </HTML> 
  5. Once the package is installed on the local computer using JPM, it will be present in the
    %windir%\Downloaded Program Files 
    folder. Use this folder to view and remove packages that are installed using Internet Explorer.


NOTE: If for some reasons you don't see the download taking place in the JPM, check the following:
  1. There are no typos in the Friendly Name you specify when using DUBUILD to cab the package.


  2. You are using the same namespace name in the HTML file and in the DUBUILD syntax.


  3. The version information matches in the HTML and in the DUBUILD syntax.


  4. Another issue is when you mark your package as System, then it shouldn't be under a namespace and it should be also signed with Full permissions. If this is the case, either leave the namespace as is but don't specify the /S option when you cab your third party classes using DUBUILD or remove the namespace and leave the /S option. When removing the namespace make sure you remove it from the .htm file also.



REFERENCES

For more information on DUBUILD or CABARC and Code-Signing, please refer to the SDK32 For Java documentation available under the topic Packaging and Distributing Software


For more information on how to make your java code trusted under Internet Explorer, please refer to the following article in the Microsoft Knowledge Base:

Q193877- HOWTO: Make Your Java Code Trusted in Internet Explorer

For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, please see the following pages on the Microsoft Technical Support site:

http://support.microsoft.com/support/visualj/

http://support.microsoft.com/support/java/

Additional query words:

Keywords : kbJavaVM kbSDKJava kbSecurity kbGrpJava kbDSupport
Version : WINDOWS:3.0,3.0 Preview 1,3.1,3.2,4.0,6.0
Platform : WINDOWS
Issue type : kbhowto


Last Reviewed: January 7, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.