{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/rhino/issues/223","labels_url":"https://api.github.com/repos/mozilla/rhino/issues/223/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/rhino/issues/223/comments","events_url":"https://api.github.com/repos/mozilla/rhino/issues/223/events","html_url":"https://github.com/mozilla/rhino/issues/223","id":97479332,"number":223,"title":"org.mozilla.javascript.JavaScriptException Error: unknown environment","user":{"login":"oswetto","id":6113075,"avatar_url":"https://avatars.githubusercontent.com/u/6113075?v=3","gravatar_id":"","url":"https://api.github.com/users/oswetto","html_url":"https://github.com/oswetto","followers_url":"https://api.github.com/users/oswetto/followers","following_url":"https://api.github.com/users/oswetto/following{/other_user}","gists_url":"https://api.github.com/users/oswetto/gists{/gist_id}","starred_url":"https://api.github.com/users/oswetto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oswetto/subscriptions","organizations_url":"https://api.github.com/users/oswetto/orgs","repos_url":"https://api.github.com/users/oswetto/repos","events_url":"https://api.github.com/users/oswetto/events{/privacy}","received_events_url":"https://api.github.com/users/oswetto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-27T14:41:42Z","updated_at":"2015-07-27T17:00:32Z","closed_at":null,"body":"My call:\r\nString uri = \"http://oasjs.kataweb.it/adagiojs/gele.js\" \r\nContext ctx = ContextFactory.getGlobal().enterContext();\r\nScriptable scope = ctx.initStandardObjects();\r\nctx.evaluateString(scope, source, uri, 1, null);\r\n\r\norg.mozilla.javascript.JavaScriptException: \r\nError: unknown environment (http://oasjs.kataweb.it/adagiojs/gele.js#84)\r\nat org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1018)\r\nat script(http://oasjs.kataweb.it/adagiojs/gele.js:83)\r\nat script(http://oasjs.kataweb.it/adagiojs/gele.js:41)\r\nat org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)\r\nat org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)\r\nat org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)\r\nat org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3282)\r\nat org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:120)\r\nat org.mozilla.javascript.Context.evaluateString(Context.java:1219)"},"comment":{"url":"https://api.github.com/repos/mozilla/rhino/issues/comments/125272074","html_url":"https://github.com/mozilla/rhino/issues/223#issuecomment-125272074","issue_url":"https://api.github.com/repos/mozilla/rhino/issues/223","id":125272074,"user":{"login":"gbrail","id":521323,"avatar_url":"https://avatars.githubusercontent.com/u/521323?v=3","gravatar_id":"","url":"https://api.github.com/users/gbrail","html_url":"https://github.com/gbrail","followers_url":"https://api.github.com/users/gbrail/followers","following_url":"https://api.github.com/users/gbrail/following{/other_user}","gists_url":"https://api.github.com/users/gbrail/gists{/gist_id}","starred_url":"https://api.github.com/users/gbrail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gbrail/subscriptions","organizations_url":"https://api.github.com/users/gbrail/orgs","repos_url":"https://api.github.com/users/gbrail/repos","events_url":"https://api.github.com/users/gbrail/events{/privacy}","received_events_url":"https://api.github.com/users/gbrail/received_events","type":"User","site_admin":false},"created_at":"2015-07-27T17:00:32Z","updated_at":"2015-07-27T17:00:32Z","body":"Normally I pass the source code (aka a String that represents the\nJavaScript that I want to run) as the second parameter to \"evaluateString.\"\nAlternately, there is a version of that function that takes a Reader. Are\nyou expecting something else, like for it to use HTTP to read your source\ncode and evaluate it?\n\nOn Mon, Jul 27, 2015 at 7:41 AM, Ivan Di Francesco <notifications@github.com\n> wrote:\n\n> My call:\n> String uri = \"http://oasjs.kataweb.it/adagiojs/gele.js\"\n> Context ctx = ContextFactory.getGlobal().enterContext();\n> Scriptable scope = ctx.initStandardObjects();\n> ctx.evaluateString(scope, source, uri, 1, null);\n>\n> org.mozilla.javascript.JavaScriptException:\n> Error: unknown environment (http://oasjs.kataweb.it/adagiojs/gele.js#84)\n> at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1018)\n> at script(http://oasjs.kataweb.it/adagiojs/gele.js:83)\n> at script(http://oasjs.kataweb.it/adagiojs/gele.js:41)\n> at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)\n> at\n> org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)\n> at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)\n> at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3282)\n> at\n> org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:120)\n> at org.mozilla.javascript.Context.evaluateString(Context.java:1219)\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/mozilla/rhino/issues/223>.\n>\n\n\n\n-- \n*Greg Brail* | *apigee <https://apigee.com/>* | twitter @gbrail\n<http://twitter.com/gbrail> @apigee <https://twitter.com/apigee>\n<http://iloveapis.com/>\n"}}