docs: public static void main(String[] args)
      {
          Context cx = Context.enter();
          try {
              // Precompile source only once
              String source = ""
                              +"var x = 'sharedScope';\n"
                              +"function f() { return x; }\n"
                              // Dynamic scope works with nested function too
                              +"function initClosure(prefix) {\n"
                              +"    return function test() { return prefix+x; }\n"
                              +"}\n"
                              +"var closure = initClosure('nested:');\n"
                              +"";
              Script script = cx.compileString(source, "sharedScript", 1, null);
  
              useDynamicScope = false;
              runScripts(cx, script);
              useDynamicScope = true;
              runScripts(cx, script);
          } finally {
              Context.exit();
          }
      }