Re: questions about capabilities of mozilla-java interoperation
Brett Zamir <[email protected]> Tue, 07 Aug 2007 01:15:47 +0800
| Newsgroups | gmane.comp.mozilla.devel.java |
|---|---|
| Message-ID | <[email protected]> |
Hello all, Javier Pedemonte wrote: >> Which ones are meant for using Java inside >> Mozilla, and which ones for connecting and commanding Mozilla from outside? >> > > JavaXPCOM and Webclient both allow embedding Mozilla in a Java app and > communicating with and commanding Mozilla. > > If you wish to create Mozilla components/extensions that use Java, then > your only option right now is to create a JavaScript component and have > it load your Java code > (http://developer.mozilla.org/en/docs/Java_in_Firefox_Extensions). > Maybe Javier meant to say this, but you can simply use LiveConnect within an extension (though you need the above approach for a component)... I guess the advantage to using the XPCOM approach mentioned at the latter site is to be able to run a singleton which can access all windows of Firefox and not just the current one. Even if you plan to write a component, it is a lot easier to try out the functionality with LiveConnect alone. LiveConnect is also easy to get started with, since it basically looks and works just like Java, plus "java.XX" or "Packages.XX" before each statement and minus strong typing. best wishes, Brett