Skip to main content

Java-to-Javascript communication using LiveConnect API

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2011-01-14

Hi, I'm looking to create an applet that will callback into some JavaScript code running in the same HTML page as the applet (using netscape.javascript.JSObject).
In order to support the widest possible audience, I was only going to require the following:

  • Java 5 (1.5) version of the plugin running in the browser (or higher)
  • IE V6 or higher
  • Firefox V3.5 or higher

Would also like to support the latest versions of Chrome and Safari, but that is only a nice to have at this point.
The doc I have found for using this API ( recommends using only a subset of the methods (like call() and eval()), in order to ensure browser portability. I think that subset is sufficient for what I need to do.
So now I have a few questions about all this:

  1. How well does this API work given the minimum requirements listed above? Is it buggy?
  2. Is this API being deprecated by the major browser vendors, such that I should consider other technologies for communicating between a Java backend and a browser (RESTful web services, etc.)?
  3. What about security considerations (I would need priviledged access such that the Java code can read and write files on the users machine while running in the browser)?
  4. What about performance considerations (the reading/writing of files could take quite a long time...don't want to lockup the browser for too long if possible)?

I mainly want to ensure that I'm not going down a long road which turns out to be a dead end!
Thanx in advance,