--- a/jdk/test/javax/script/Test1.java Sun Aug 17 17:02:04 2008 -0700
+++ b/jdk/test/javax/script/Test1.java Mon Aug 18 15:28:54 2008 -0700
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 6249843
+ * @bug 6249843 6705893
* @summary Create JavaScript engine and execute a simple script.
* Tests script engine discovery mechanism.
*/
@@ -35,9 +35,10 @@
public static void main(String[] args) throws Exception {
System.out.println("\nTest1\n");
ScriptEngineManager manager = new ScriptEngineManager();
- ScriptEngine jsengine = manager.getEngineByName("js");
+ ScriptEngine jsengine = Helper.getJsEngine(manager);
if (jsengine == null) {
- throw new RuntimeException("no js engine found");
+ System.out.println("Warning: No js engine found; test vacuously passes.");
+ return;
}
jsengine.eval(new FileReader(
new File(System.getProperty("test.src", "."), "Test1.js")));