home *** CD-ROM | disk | FTP | other *** search
-
- This sample demonstrates Java -> COM and COM -> Java communications.
-
- We invoke this sample from Java. The constructor of the class we invoke
- instantiates a COM-implemented object. 3 methods are then exercised. The
- first 2 take and return numeric arguments. The 3rd method in our COM object
- instantiates a Java-implemented object, and passes the interface pointer back
- up to Java, caching a local copy for its use later on. The new java object is
- then used from both Java and COM, transparently i.e. the COM object treats it
- no differently than another COM object, and Java treats it as a Java object.
-
- CONTENTS -----------------------------------------------------------------------
-
- odl\ ** interface descriptions
- NatCom.odl
- jNatCom.odl
-
- com\ ** COM server
- natcom.cpp
- natcom.def
- natcom.h
- makefile
-
- java\
- _1\ ** run this to exec sample
- JMain.java
- makefile
-
- _2\ ** called from COM and java
- JMain.java
- reg.bat
- makefile
-
- BUILD INSTRUCTIONS -------------------------------------------------------------
-
- dependencies: jvc.exe, javatlb.exe, cpdbase.dll (all in the SDK BIN
- directory)
-
- From this subdirectory: nmake /a
-
- To register everything:
-
- cd com
- regsvr32 natcom.dll
- cd ..\java\_2
- reg
- cd ..\..
-
- RUNNING THE SAMPLE -------------------------------------------------------------
-
- 1. make sure COM server has been registered (via regsvr32 natcom.dll)
-
- 2. make sure that java._2.JMain has been registered (run java\_2\reg.bat)
-
- 3. to run: JVIEW java._1.JMain
- ** assuming CLASSPATH env variable searches '.' subdirectory
-