multiple jvms
1 posts in topic
Flat View  Flat View

Posted By:   frederi_barachant
Posted On:   Monday, May 7, 2001 01:52 AM

I wish to create plugins for a software. Each plugin will be a C library creating a jvm and calling the classes needed.
The problem i'm actually facing is that each and every plugin will open its own jvm, and of course, that's not what i want.
The question is: how can i reuse the same JVM across processes? If this has to be done by hand, do you have a clue on how tom implement? If that can be done automatically, pleaaaaaase, tell me.

Re: multiple jvms

Posted By:   Alexander_Krapf  
Posted On:   Thursday, May 10, 2001 03:02 PM

Hi Frederi,

there are at least two ways you can do this:

  1. Keep state in a shared library that is used by all plugins.
  2. Use the JNI function JNI_GetCreateJavaVMs to query for the JVM before trying to create one.

You could also use our JunC++ion product, a tool that generates C++ proxy classes for Java classes, then your plugins could directly correspond with wrapped Java classes and you would not have to do any additional work.

You can find out more about JunC++ion at http://www.codemesh.com.

Good luck,


About | Sitemap | Contact