This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: shared library issues


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]