From 5275bebcab3e1e5c65d5f86fa47e0874950a4488 Mon Sep 17 00:00:00 2001 From: Sean Mullan Date: Wed, 5 Oct 2016 12:36:01 -0400 Subject: [PATCH] 8166632: Document how to grant permissions for a module jrt:/ in the image Reviewed-by: alanb, mchung --- jdk/src/java.base/share/conf/security/java.policy | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/jdk/src/java.base/share/conf/security/java.policy b/jdk/src/java.base/share/conf/security/java.policy index b3df0542199..1554541d126 100644 --- a/jdk/src/java.base/share/conf/security/java.policy +++ b/jdk/src/java.base/share/conf/security/java.policy @@ -1,5 +1,18 @@ -// default permissions granted to all domains +// +// This system policy file grants a set of default permissions to all domains +// and can be configured to grant additional permissions to modules and other +// code sources. The code source URL scheme for modules linked into a +// run-time image is "jrt". +// +// For example, to grant permission to read the "foo" property to the module +// "com.greetings", the grant entry is: +// +// grant codeBase "jrt:/com.greetings" { +// permission java.util.PropertyPermission "foo", "read"; +// }; +// +// default permissions granted to all domains grant { // allows anyone to listen on dynamic ports permission java.net.SocketPermission "localhost:0", "listen";