This article has three sections:
This sample does not run as an applet. In the sample directory, there is a COM client for this COM component written in Java. The client is VBDRIVER.EXE. It is is written in Microsoft® Visual Basic® 4.0.
See the source code.
The COMCallingJava sample shows how to create and register an ActiveX component using Java and Visual J++.
CEuclid is a simple Automation server written in Java. It is has a single method GCD that calculates the greatest common factor (denominator) of two numbers. The input numbers are the parameters to GCD.
This sample shows how to create an ActiveX (COM) component in Java. This component can be used from any Automation controller. Microsoft® Visual Basic® is an example of an Automation controller.
COMCallingJava includes a test driver for the CEuclid class. The test driver VBDriver was written using VB 4.0. The code for VBDriver is in the VBDRIVER subdirectory.
Return to the top of this article.
To run the COMCallingJava sample:
regsvr32.exe msmask32.ocx
Return to the top of this article.
This sample includes the following files.
Project files:
Support files:
Return to the top of this article.