Firefox <-- liveconnect --> Java

G

Guillaume CABANAC

Hi folks,

Is liveconnect still available in Firefox as it is in NS Navigator ?

I would like to call Java code from JavaScript in Firefox... Do you
think it is possible with liveconnect ? Does a better strategy exists ?

I tried to call Java from Javascript like this :

var myBook = new Packages.Book() ;

But it doesn't work ("Packages.Book is not a constructor" in the JS
console, although it is !). I thought I should tell Firefox where my jar
is... And finally put my jar file into the jre/lib... Put it doesn't work
anyway.

Could somebody help me ? Have you ever tried to use YOUR Java code
through liveconnect ? Is there any security restriction ???

Thanks a lot,

Guillaume, from France
 
M

Martin Honnen

Guillaume CABANAC wrote:

Is liveconnect still available in Firefox as it is in NS Navigator ?

No, there are a lot of differences, Netscape 4 has its own Java VM while
Mozilla and Firefox makes use of the Sun JRE (or whatever Java runtime
environment is available on the platform).
I think in Mozilla you can still access anything in the standard Java
packages but somehow other classes are not loaded.
The same with Opera I think.
Whether that is considered a bug I am not sure.
I would like to call Java code from JavaScript in Firefox... Do you
think it is possible with liveconnect ? Does a better strategy exists ?

You could place your Java stuff in an applet and access public members
of the applet, that should still work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top