Accessing Java classes: Java XPCOM, Liveconnect or NPAPI? - Mozilla

This is a discussion on Accessing Java classes: Java XPCOM, Liveconnect or NPAPI? - Mozilla ; Hi I currently have some Java classes. Instead of converting them to Javascript, I am exploring of using Java XPCOM or Liveconnect to integrate them into a Thunderbird extension. However, http://boomswaggerboom.wordpress.com...or-mozilla-20/ seems to indicate that Liveconnect is not longer going ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Accessing Java classes: Java XPCOM, Liveconnect or NPAPI?

  1. Accessing Java classes: Java XPCOM, Liveconnect or NPAPI?

    Hi

    I currently have some Java classes. Instead of converting them to
    Javascript, I am exploring of using Java XPCOM or Liveconnect to
    integrate them into a Thunderbird extension.

    However,
    http://boomswaggerboom.wordpress.com...or-mozilla-20/
    seems to indicate that Liveconnect is not longer going to be in use.

    Is NPAPI easy to use? Seems complicated to me. Does anyone knows where I
    can find a good example? Or should I just use Liveconnect or etc?

    Thanks.

    Regards
    Yongqing

  2. Re: Accessing Java classes: Java XPCOM, Liveconnect or NPAPI?

    Yongqing wrote:
    > Hi
    >
    > I currently have some Java classes. Instead of converting them to
    > Javascript, I am exploring of using Java XPCOM or Liveconnect to
    > integrate them into a Thunderbird extension.
    >

    Umm, I don't think tbird ships with Java plugin enabled [1] - I might be
    wrong, of course. I wonder if you have to somehow attach a VM yourself...

    > However,
    > http://boomswaggerboom.wordpress.com...or-mozilla-20/
    > seems to indicate that Liveconnect is not longer going to be in use.
    >
    > Is NPAPI easy to use? Seems complicated to me. Does anyone knows where I
    > can find a good example? Or should I just use Liveconnect or etc?


    I can't tell if Tbird ships with plugins (Java or not) enabled - trying
    to browse aboutlugins in my old Tbird 1.5.0.x breaks [2].
    >
    > Thanks.
    >
    > Regards
    > Yongqing


    Hmm, I don't think I was actually helpful

    [1] http://lxr.mozilla.org/mozilla/sourc...confvars.sh#47
    [2] Error: uncaught exception: [Exception... "Component returned failure
    code: 0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED)
    [nsIDOMJSPluginArray.refresh]" nsresult: "0x80040154
    (NS_ERROR_FACTORY_NOT_REGISTERED)" location: "JS frame :: aboutlugins
    :: :: line 67" data: no]

    --
    Mook
    mook dot moz plus stuff at gmail dot com

  3. Re: Accessing Java classes: Java XPCOM, Liveconnect or NPAPI?

    On Wed, 20 Jun 2007 13:07:56 -0700, Mook wrote:

    > I can't tell if Tbird ships with plugins (Java or not) enabled - trying
    > to browse aboutlugins in my old Tbird 1.5.0.x breaks [2].


    Only on trunk builds I'm afraid (and some third-party builds of course).

    Phil

    --
    Philip Chee ,
    http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
    Guard us from the she-wolf and the wolf, and guard us from the thief,
    oh Night, and so be good for us to pass.
    [ ]Ground yourself, THEN hug your motherboard!
    * TagZilla 0.066.6


  4. Re: Accessing Java classes: Java XPCOM, Liveconnect or NPAPI?

    AFAIK Java XPCOM is designed to let you use Mozilla inside of your Java application but not the other way around.

    To use your existing java code from XULRunner (TB is also a XUL application) you have to use LiveConnect, which is a transparent Java to Javascript bridge. LiveConnect is a feature of java plugin so it comes out of the box.

    You can google for more details about using LiveConnect. I also published a short set of instructions in my blog:

    http://stanislavvitvitskiy.blogspot....lications.html

+ Reply to Thread