Re: Why does JavaXPCOM require XULRunner?
Michal Ceresna <[email protected]> Sun, 10 Feb 2008 03:41:29 +0100
| Newsgroups | gmane.comp.mozilla.devel.java |
|---|---|
| Message-ID | <200802100341.29440.michal.ceresna__47054.221694316$1202851998$gmane$org@gmail.com> |
On Saturday 09 February 2008, Jack Smith wrote: Dear Jack, > This question has probably been asked a million times, but after searching > the archives I didn't find anything: Is it possible to use JavaXPCOM to > make Java apps communicate with Firefox extensions, or is it truly > XULRunner-only? As of today, this is the status of a "Java app" <-> "Firefox extensions" communication using JavaXPCOM: -> YES: embed xulrunner (firefox) with your extension into your java app and communicate with the extension from java code -> NO: run firefox with your exception and call some java code from it > I made a sidebar Firefox extension to act as the GUI for a command-line > Java app I wrote. The only problem is that the communication is one-way -- > I can use nsIProcess to launch the .j ar file from the extension, but it > can't receive any information back as the app is running! Do you know liveconnect? http://developer.mozilla.org/en/docs/LiveConnect As far as I understand your usecase, liveconnect is the technology you are looking for. Or, some Firefox extension use for the communication with a java program http or stdin/stdout. Although not an ideal communication channel, sometimes it is really the easiest way. best regards, Michal