test/sun/tools/jrunscript/jrunscript-cpTest.sh
Print this page
@@ -44,11 +44,11 @@
# we check whether classpath setting for app classes
# work with jrunscript. Script should be able to
# access Java class "Hello".
-${JRUNSCRIPT} -cp . <<EOF
+${JRUNSCRIPT} -J-Djava.awt.headless=true -cp . <<EOF
var v;
try { v = new Packages.Hello(); } catch (e) { println(e); exit(1) }
if (v.string != 'hello') { println("Unexpected property value"); exit(1); }
EOF
@@ -56,11 +56,11 @@
exit 1
fi
# -classpath and -cp are synonyms
-${JRUNSCRIPT} -classpath . <<EOF
+${JRUNSCRIPT} -J-Djava.awt.headless=true -classpath . <<EOF
var v;
try { v = new Packages.Hello(); } catch (e) { println(e); exit(1) }
if (v.string != 'hello') { println("unexpected property value"); exit(1); }
EOF