Firefox <-- liveconnect --> Java

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Guillaume CABANAC

    Firefox <-- liveconnect --> Java

    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.B ook 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



  • Martin Honnen

    #2
    Re: Firefox &lt;-- liveconnect --&gt; Java



    Guillaume CABANAC wrote:

    [color=blue]
    > Is liveconnect still available in Firefox as it is in NS Navigator ?[/color]

    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.
    [color=blue]
    > I would like to call Java code from JavaScript in Firefox... Do you
    > think it is possible with liveconnect ? Does a better strategy exists ?[/color]

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


    --

    Martin Honnen

    Comment

    Working...