This sample is located in \Samples\Com\Com.
Description
Using the Sample
Key Project Files
Technologies Demonstrated
This sample creates a simple Java/COM object that passes strings and object arrays from the client to the server, and then back to the client. It uses a type library (.tlb) created by javareg (with jactivex) to make the Java/COM wrappers that communicate between the client and the COM object.
To compile the sample
Use Nmake.exe to compile the makefile in \Samples\Com\Com.
To install the sample on the server
Server
Run Register.bat in \Samples\Com\Com. This batch file runs javareg to register the Java/COM object and generates a type library file. A dialog box appears that indicates the object was registered correctly.
To uninstall the sample from the server
Server
Run Remove.bat in \Samples\Com\Com. This batch file uses javareg to remove the Java/COM object from the registry. A dialog box appears that indicates the object was removed correctly.
To run the sample
Use the following command from the \Samples\Com\Com directory on the server to run the COM client sample:
jview sample.dcom.Client
If the command is successful, output from the COM object and the Client appears in the window. The last message will be Client - Done.
This simple client uses the wrappers generated by jactivex to instantiate a new instance of the COM object.
Hub.javaThis is a Java object that is registered as a Java/COM object.
IListeners.javaThis simple Java interface contains the methods used by the client.
This sample shows how to: