shared library issues
Thomas Fitzsimmons
fitzsim@redhat.com
Sun May 1 01:29:00 GMT 2005
Hi,
On Sun, 2005年05月01日 at 02:09 +0100, Stéphane Konstantaropoulos wrote:
> Hello,
>> For my work (java plugin for gecko),
First of all, have you looked at gcjwebplugin?
http://savannah.nongnu.org/projects/gcjwebplugin
> I'd like to use libgcj directly as
> a shared object and for this I have a couple of questions:
>> - Is it possible to initialize and shutdown the JVM without exiting the
> calling program?
>
Yes, using CreateJavaVM and DestroyJavaVM.
> - Is it possible to have multiple instances of the JVM in the same
> process?
>
Yes, although if you're running AWT programs you may encounter problems
initializing the GLib main loop multiple times.
> I'd like to use CNI and to run the Java applets from C++ as the plugin
> code will be in (Gecko style) C++. Do you think this is really a bad
> idea?
>
We tried this approach. We dropped it in favour of running the applet
viewer in a separate process and embedding its window in the browser
using the XEmbed extension. This eliminates GLib main loop problems and
(in some cases) prevents the browser from crashing when gcjappletviewer
crashes.
Try gcjwebplugin; there's still work to be done but it does run simple
applets.
Tom
More information about the Java
mailing list