< prev index next >
test/jdk/javax/script/Helper.java
Print this page
*** 28,41 ****
*/
public class Helper {
private Helper() {}; // Don't instantiate
public static ScriptEngine getJsEngine(ScriptEngineManager m) {
! ScriptEngine e = m.getEngineByName("nashorn");
! if (e == null &&
! System.getProperty("java.runtime.name").startsWith("Java(TM)")) {
! // A js engine is requied for Sun's product JDK
! throw new RuntimeException("no js engine found");
! }
! return e;
}
}
--- 28,35 ----
*/
public class Helper {
private Helper() {}; // Don't instantiate
public static ScriptEngine getJsEngine(ScriptEngineManager m) {
! return m.getEngineByName("nashorn");
}
}
< prev index next >