Re: calling java from a javascript XPCOM component

From: Andrew Harrison <>
Date: Mon, 12 Dec 2005 20:33:19 +0000

Hi David,

I've been playing with your java-firefox-extension once I realised I
(you) could get java from XUL. I've got to say it's gold dust. I got
JNI working with pre1.5 but had endless permission problems with 1.5
(in Mac). I'm no C++ expert and no XPCOM expert (why am I doing this
then?) So I'm rewriting the java access code using your stuff. I can
get on with what my idea was now... if I can remember...



On 8 Dec 2005, at 18:52, David Huynh wrote:

> Andrew Harrison wrote:
>> Hi David,
>> Thanks for this. I decided to get to Java via C++ because I
>> didn't want to go via a webpage. I was writing a protocol
>> handler, so your technique of using LiveConnect didn't work for me.
> I think it's actually possible to write a protocol handler in
> Javascript. And you can get to Java from Javascript code inside XUL
> rather than inside HTML.
>> There are some similarities to your method however. I had to get
>> to the already initialized JVM that is loaded with the browser,
>> so I couldn't set a classpath like you would normally do with JNI
>> when creating a JVM. Instead I have to get a URLClassLoader and
>> pass it the libs and classes to load.
>> I've been listening to the discussions on this list since my
>> initial query and it's very interesting. My protocol handler
>> calls back to a P2P framework we're developing (at Cardiff,
>> Wales, UK). The aim of the extension is to allow publishing and
>> discovery of resources in a decentralised manner - i.e. your
>> browser becomes a Peer. This issue has been touched upon in the
>> list with regards to Semantic Bank. I'd like to tie in my stuff
>> with Piggy Bank when I get the time. Unfortunately I'm having to
>> work on this firefox stuff 'out of hours' so progress is patchy,
>> but hopefully I'll have something going in the new year. I'll
>> let you know.
> Awesome! Looking forward to see it :-)
> David
Received on Mon Dec 12 2005 - 20:26:29 EST

This archive was generated by hypermail 2.3.0 : Thu Aug 09 2012 - 16:39:18 EDT