Javabeans bridge for ActiveX

Posted on 2007-08-08
Last Modified: 2008-01-09
I need to perform the following with Java 1.5 or java 6 but can't figure it out please help.

A. Prerequisites
Install JRE (Java Run Time Environment) International version between 1.2 and
1.3.1_08. JRE 1.3.1_08 can be downloaded from the Sun web site URL If you already have a Java Development Kit installed on your machine and it is not a suitable version, download and install the above JRE.

Note: The DCIDCompression component will support JRE (Java Run Time Environment) versions between 1.2.x and 1.3.1_08 only. JRE versions below 1.2 and or above 1.3.1_08 are not supported. International version of JRE needs to be used (not the U.S. English version) and it is either denoted as International or the all languages version for Windows. JRE version 1.4.x has not been tested by DCID for DCIDCompression component.

B. Registration of DCIDCompression Bean

1.      Copy the JAR file, DCIDCompression.jar (shipped with this release) to a local folder.

2.      From the command line, go to the Java Runtime environment directory.
cd C:\Program Files\JavaSoft\JRE\1.3.1_08 (ex: If you installed JRE in C:\Program Files\JavaSoft\JRE\1.3.1_08)

3.      Enter the below commands in the command prompt.
java -cp  lib\rt.jar;lib\jaws.jar  sun.beans.ole.Packager

4.      Following screen will be displayed. Click on the Browse button and choose the DCIDCompression.jar file and click on Next.

5.      The following screen is displayed to pack the JavaBean. By default DCIDCompression will be selected. Click on Next without modifying the name.

6. Choose the name you want to assign to this component in the following screen.  By
    default DCIDCompression is assigned and is recommended. Click on Next.

Note: If you choose a different name, you have to modify the DCIDClient.vbp to refer bean control with the modified name.

7.      The following screen will be displayed, to specify the directory location where the .tlb and .reg files have to be created. By default, these files (DCIDCompression.tlb and DCIDCompression.reg) will be created in the JRE installed directory. If you want to save them in another location, enter the new directory path and click on Next.

8.      You will be prompted with the following screen to register this ActiveX control. The checkbox will be checked by default to register the Bean control in the System registry.

      Note: Make sure that the Check Box is checked before clicking Start generation 

Now, click on Start Generation Button.

9.      The following screen will be displayed with the message Packaging Succeeded.  This states that you have successfully registered the Java component and it is ready to use. You can view the .tlb and the .reg files generated, in the above selected location.

I get the following error

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\rbreault>cd "c:\Program Files\Java\jre1.6.0_02"

C:\Program Files\Java\jre1.6.0_02>dir
 Volume in drive C is Preload
 Volume Serial Number is 8812-EE22

 Directory of C:\Program Files\Java\jre1.6.0_02

08/08/2007  12:00 PM    <DIR>          .
08/08/2007  12:00 PM    <DIR>          ..
08/08/2007  12:00 PM    <DIR>          bin
07/12/2007  04:14 AM             2,539 COPYRIGHT
08/08/2007  12:00 PM    <DIR>          lib
08/08/2007  11:59 AM            11,384 LICENSE
08/08/2007  11:59 AM            14,925 LICENSE.rtf
07/12/2007  02:04 AM            17,262 LICENSE_de.rtf
07/12/2007  02:04 AM            16,338 LICENSE_es.rtf
07/12/2007  02:04 AM            16,060 LICENSE_fr.rtf
07/12/2007  02:04 AM            15,481 LICENSE_it.rtf
08/08/2007  11:59 AM           142,208 LICENSE_ja.rtf
07/12/2007  02:04 AM            37,867 LICENSE_ko.rtf
07/12/2007  02:04 AM            15,511 LICENSE_sv.rtf
07/12/2007  02:04 AM            27,330 LICENSE_zh_CN.rtf
08/08/2007  11:59 AM           215,633 LICENSE_zh_TW.rtf
07/12/2007  02:04 AM            14,340 README.txt
07/12/2007  02:04 AM           180,676 THIRDPARTYLICENSEREADME.txt
07/12/2007  02:04 AM               994 Welcome.html
              15 File(s)        728,548 bytes
               4 Dir(s)  57,746,710,528 bytes free

C:\Program Files\Java\jre1.6.0_02>java -cp  lib\rt.jar;lib\jaws.jar  sun.beans.o
Exception in thread "main" java.lang.NoClassDefFoundError: sun/beans/ole/Package

C:\Program Files\Java\jre1.6.0_02>

Any help would be great
Question by:jareddraper
    LVL 86

    Accepted Solution


    java -classpath C:\PROGRA~1\Java\jdk1.6.0\.\jre\lib\plugin.jar <arguments here>

    Author Comment

    So I use that command and at arguments I would put the file I want to wrap correct?
    LVL 86

    Expert Comment



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
    Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
    Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
    This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now