How to Run COM Clients in Native Mode (JVM In-process)

This technique should be used to load the JVM into the COM client's address space.

Again, use the 'regjvm' command, but this time specify additional parameters.

The simplest example is to use Visual Basic to perform late bound access to Java objects. First register the Jvm. If you are using Sun's JDK 1.3.1, which is installed under c:\jdk1.3.1_03, J-Integra® which is installed under c:\jintegra, and your Java classes which are under c:\pure, you would use:

As you can see, you specify the JVM name, the CLASSPATH, and the JVM bin directory path.

From VB you should now be able to do:
MessageBox GetObject("MyJvm:java.util.Hashtable")

If you wish to specify properties to be set for the JVM, add them at the end of the regjvm command line, in the form name=value, separated by spaces (don't use -Dname=value). For example if you run into problems, enable logging by adding JINTEGRA_LOG_LEVEL=3 and JINTEGRA_LOG_FILE=c:\temp\jintegra.log to the end of the 'regjvm' command.

The mechanism described above (calling com.linar.jintegra.Log.logImmediately(...)) only works when your Java class has had a chance to run -- there may be a problem before then.

If you get the E_NOMONIKER error, please enable logging in the J-Integra® moniker and example the classpath that is being used to ensure it has any JVM classes that are required, as well as the J-Integra® runtime (jintegra.jar) and any classes you may need.