Here you can find the source of getJavaObject(Scriptable scope, String name)
public static Object getJavaObject(Scriptable scope, String name)
//package com.java2s; /*//from w w w . j a v a 2 s. c o m * Copyright by Vinicius Isola, 2010 * Licensed under the MIT license: * http://www.opensource.org/licenses/mit-license.php */ import org.mozilla.javascript.NativeJavaObject; import org.mozilla.javascript.Scriptable; public class Main { public static Object getJavaObject(Scriptable scope, String name) { NativeJavaObject objWrapper = (NativeJavaObject) scope.get(name, null); return objWrapper.unwrap(); } }