Skip to content
Snippets Groups Projects
Commit 1795d123 authored by Thomas Oster's avatar Thomas Oster
Browse files

Use js.jar because not all JVMs contain Rhino

parent d6263f21
No related branches found
No related tags found
No related merge requests found
File added
......@@ -45,6 +45,7 @@ endorsed.classpath=
excludes=
file.reference.commons-net-3.1.jar=lib/commons-net-3.1.jar
file.reference.jna.jar=lib/jna.jar
file.reference.js.jar=lib/js.jar
file.reference.purejavacomm.jar=lib/purejavacomm.jar
includes=**
jar.archive.disabled=${jnlp.enabled}
......@@ -53,7 +54,8 @@ jar.index=${jnlp.enabled}
javac.classpath=\
${file.reference.commons-net-3.1.jar}:\
${file.reference.jna.jar}:\
${file.reference.purejavacomm.jar}
${file.reference.purejavacomm.jar}:\
${file.reference.js.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
......
......@@ -23,11 +23,11 @@ import java.io.InputStreamReader;
import java.io.Reader;
import java.io.StringReader;
import javax.script.ScriptException;
import sun.org.mozilla.javascript.Context;
import sun.org.mozilla.javascript.ContextFactory;
import sun.org.mozilla.javascript.NativeJavaObject;
import sun.org.mozilla.javascript.Scriptable;
import sun.org.mozilla.javascript.WrapFactory;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.ContextFactory;
import org.mozilla.javascript.NativeJavaObject;
import org.mozilla.javascript.Scriptable;
import org.mozilla.javascript.WrapFactory;
/**
* This class provides a JavaScript interpreter which is pretty sandboxed.
......@@ -95,7 +95,7 @@ public class ScriptInterpreter
{
ContextFactory.initGlobal(new SandboxContextFactory());
}
Context cx = ContextFactory.getGlobal().enterContext();
Context cx = ContextFactory.getGlobal().enter();
try
{
cx.setClassShutter(ScriptingSecurity.getInstance());
......
......@@ -18,7 +18,7 @@
**/
package com.t_oster.liblasercut.laserscript;
import sun.org.mozilla.javascript.ClassShutter;
import org.mozilla.javascript.ClassShutter;
/**
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment