--- a/jdk/src/java.base/share/conf/security/java.policy Wed May 18 10:42:29 2016 +0200
+++ b/jdk/src/java.base/share/conf/security/java.policy Wed May 18 15:03:39 2016 +0530
@@ -80,6 +80,10 @@
permission java.security.AllPermission;
};
+grant codeBase "jrt:/java.scripting" {
+ permission java.security.AllPermission;
+};
+
grant codeBase "jrt:/jdk.scripting.nashorn" {
permission java.security.AllPermission;
};
--- a/jdk/test/javax/script/ProviderTest.sh Wed May 18 10:42:29 2016 +0200
+++ b/jdk/test/javax/script/ProviderTest.sh Wed May 18 15:03:39 2016 +0530
@@ -43,8 +43,18 @@
-C ${TESTCLASSES} DummyScriptEngineFactory.class \
-C "${TESTSRC}" META-INF/services/javax.script.ScriptEngineFactory
-echo "Running test ..."
+echo "Running test with security manager ..."
+$JAVA ${TESTVMOPTS} -Djava.security.manager -classpath \
+ "${TESTCLASSES}${PS}${TESTCLASSES}/dummy.jar" \
+ ProviderTest
+ret=$?
+if [ $ret -ne 0 ]
+then
+ exit $ret
+fi
+
+echo "Running test without security manager ..."
$JAVA ${TESTVMOPTS} -classpath \
"${TESTCLASSES}${PS}${TESTCLASSES}/dummy.jar" \
ProviderTest