First, excuse my english.

I need some helps about a way to communicate with firefox in my java
code. I try to use the class Context
to do it but it doesn't work. It uses Rhino technology (https://
developer.mozilla.org/en/Rhino_documentation) .

I've found in internet code like that :

Context cx = Context.enter();
Scriptable scope = cx.initStandardObjects(null);
Object result = cx.evaluateString(scope, monScript, "", 1, null);

(i want to do a script which will load a website on firefox but it
doesn't work, so i've put on it something like "var x = 2;" in order
to do not have error)

I don't know if it is normal but result returns to me undefined. For
me it isn't.

Rhino seems to be old, so I would like to know if it always possible
to communicate to firefox with this techno.

I know that there are others ways to do what i want but i want to use
rhino if possible (used in previous project).

Thank you for your attention and your response.