Fallback For No JS Engine
This commit is contained in:
parent
3fc02c46fa
commit
479e884a06
1 changed files with 4 additions and 0 deletions
|
@ -51,6 +51,10 @@ public class JavascriptPluginLaunchStrategy implements PluginLaunchStrategy
|
||||||
if (engine == null)
|
if (engine == null)
|
||||||
{
|
{
|
||||||
engine = manager.getEngineByName(fallBackEngine);
|
engine = manager.getEngineByName(fallBackEngine);
|
||||||
|
|
||||||
|
if (engine == null)
|
||||||
|
throw new Exception("Cannot find Javascript script engine! Please contact Konloch.");
|
||||||
|
|
||||||
Bindings bindings = engine.getBindings(ScriptContext.ENGINE_SCOPE);
|
Bindings bindings = engine.getBindings(ScriptContext.ENGINE_SCOPE);
|
||||||
bindings.put("polyglot.js.allowHostAccess", true);
|
bindings.put("polyglot.js.allowHostAccess", true);
|
||||||
bindings.put("polyglot.js.allowAllAccess", true);
|
bindings.put("polyglot.js.allowAllAccess", true);
|
||||||
|
|
Loading…
Reference in a new issue