Scriptable scope = getScope();
Context cx = Context.getCurrentContext(); Scriptable scope = (Scriptable) cx.getThreadLocal("threadscope");
    public Object get(String s, Scriptable scriptable) {        Scriptable scope = getScope();        if (scope != null) {            Object obj = scope.get(s, scope);            if (obj != null && obj != NOT_FOUND) {                return obj;            }        }        return super.get(s, scriptable);    }