I have completed a program to manipulate JavaScript objects from Java

```
String buildInfoJS = "var build_info = new Object;build_info.BUILD_DISPLAY_VERSION       = 'Build 201302232300'";
ScriptEngineManager mgr = new ScriptEngineManager();
ScriptEngine jsEngine = mgr.getEngineByName("JavaScript");
jsEngine.eval(buildInfoJS);
Object object = jsEngine.get("build_info");
System.out.println(object.getClass().getName());

if (object instanceof NativeObject  ) {
    NativeObject nObj = (NativeObject)object 
    for (Object key: nObj.getAllIds()) {
        System.out.println(key);
    }
}

```

Now object is `instanceof sun.org.mozilla.javascript.internal.NativeObject`, but I can't use these directly.

Is there any way to resolve this?