PRB: Unable to Deploy an ActiveX Control Created Using Visual J++ 6.0
ID: Q214647
|
The information in this article applies to:
-
Microsoft Visual J++, version 6.0
-
Microsoft virtual machine
SYMPTOMS
An ActiveX control created using Visual J++ 6.0 fails to load inside the browser when deployed to a client machine or on a Web server.
CAUSE
The following is a checklist that outlines the cause of this problem:
- Your ActiveX control project is not packaged into a COM DLL.
- The client machine is running a build of Microsoft virtual machine that is earlier than 2922. Only Microsoft VM builds 2922 and greater support the Windows Foundation Classes for Java (WFC).
- The machine has a duplicate version of the same ActiveX control in a different directory.
RESOLUTION
A work around is available. See the "More Information" section later in this article for details.
MORE INFORMATIONSteps to Reproduce Behavior
- Create the ActiveX control as follows using Visual J++ 6.0:
- From the File menu, click New Project.
- On the New tab, expand the Visual J++ Projects folder and click Components. Click the Control icon.
- In the Name box, enter a name for your project.
- In the Location box, enter the path where you want to save your project, or click Browse to navigate to the folder.
- Click Open. A collapsed view of your project appears in Project Explorer.
- In Project Explorer, expand the project node. A file with the default name of Control1.java has been added to your project.
- Use the following steps to expose this control as an ActiveX control:
- On the Project menu, click Project Properties to bring up the Project Properties dialog box.
- Select the COM Classes tab in the Project Properties dialog box.
- In the COM Classes tab, click Automatically generate Type Library.
- Select the class you wish to make a COM class.
- By default, Visual J++ creates a type library file based on the name of the project.
- Modify your new Control and add it to a new form.
- Package your Control Project into a Cab Archive as follows:
- On the Project menu, click Project Properties to open the Project Properties dialog box.
- Select the Output Format tab.
- Select Enable Packaging and select Cab Archive(.CAB) as the packaging type.
- Rebuild your Control Project.
- Create an HTML file as follows that references your control and the CAB file:
<HTML>
<HEAD>
<TITLE>
Deploy WFC ActiveX Control
</TITLE>
</HEAD>
<BODY>
<OBJECT id="JavaCtl"
classid="CLSID:5D178FF9-AF1B-11D2-BAEE-0000F87A47A8"
codeBase="JavaCtl.CAB#version=1,0,0,1">
</OBJECT>
</BODY>
</HTML>
- Launch the HTML file.
- This opens the Signing Certificate, but fails to load your ActiveX control.
Workaround
Replace steps 4-8 with the following:
- Package your Control Project into a COM DLL as follows:
- On the Project menu, click Project Properties to open the Project Properties dialog box.
- Select the Output Format tab.
- Select Enable Packaging and select COM DLL as the packaging type.
- Rebuild your Control Project.
- Create another new Project.
- Select Visual Studio and click the Distribution Units node.
- Select Cabinet(CAB).
- Add items to your new CAB file.
- From the Project menu, click Add Item.
- Include the DLL you created earlier.
- Rebuild the Cabinet File Project.
- Create a HTML file as follows that references your control and the CAB file:
<HTML>
<HEAD>
<TITLE>
Deploy WFC Activex Control
</TITLE>
</HEAD>
<BODY>
<OBJECT id="JavaCtl"
classid="CLSID:5D178FF9-AF1B-11D2-BAEE-0000F87A47A8"
codeBase="JavaCtl.CAB#version=1,0,0,1">
</OBJECT>
</BODY>
</HTML>
- Launch the HTML file.
The ActiveX Control loads as expected. NOTE: To deploy this ActiveX Control to another machine or Web server, copy the .html file and the .CAB file.
REFERENCESFor 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 : kbCtrlCreate kbJava kbVJ600 kbWFC kbGrpJava kbDSupport
Version : WINDOWS:6.0
Platform : WINDOWS
Issue type : kbprb
|