flowerpot
flowerpot

Reputation: 519

Java not found from mozilla add on

I am developing a Firefox addon which is required to call a Java class by loading an external jar file.

I am trying to call Java from lib/main.js file of my add on. A very simple line like:

var myString = new java.lang.String("hello");

It is throwing an error:

ReferenceError: java is not defined

How can I call Java from an add-on? I am able to call any java class from a standlone js file, invoked via a html file. But when I call from the js file in the add-on it cannot find Java.

Upvotes: 0

Views: 644

Answers (1)

A B
A B

Reputation: 8866

If you want to run a Java applet, see examples and documentation here:

http://en.wikipedia.org/wiki/Java_applet

http://docs.oracle.com/javase/tutorial/deployment/applet/


Or are you writing a Firefox extension?

https://developer.mozilla.org/en/Java_in_Firefox_Extensions

It's not clear to me whether LiveConnect is still supported in recent versions of Firefox.

Upvotes: 1

Related Questions