Hi ,
 I have a class
class person{
        String name;
}

and another class wherein i create an object of person class with set
its member name value.

public class Test {


    public static void main(String[] args) {
        try {
            Context cx = Context.enter();
            person p1 = new person();
            p1.name = "beadar";
            Scriptable scope = cx.initStandardObjects();
            ScriptableObject.defineClass(scope, person.class);
            FileReader script = new FileReader("check.js");
            Object result = cx.evaluateReader(scope, script,"<cmd>",
1, null);
              System.out.println(result);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}


What i want to know is, is there a way in check.js where i can catch
hold of p1 instance where in i  can retreive its state like for ex: do
p1.name in the javascript.

Thanks
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to