diff options
author | Andrew Azores <[email protected]> | 2014-01-17 13:43:09 -0500 |
---|---|---|
committer | Andrew Azores <[email protected]> | 2014-01-17 13:43:09 -0500 |
commit | c4bef6cad39892b850022c8f85c1edd97b0c7b40 (patch) | |
tree | 50e5af192a64a3a7da0f04eaf5fae1a2c6eeee48 /tests/reproducers/simple/CustomPolicies/srcs/CustomPolicies.java | |
parent | 4cc1ae82645431a5c1f0958a800e8e5dfc012086 (diff) |
Added PolicyPanel to itweb-settings for custom policies
Added itweb-settings panel to explain custom policy files and allow
launching a policy editor for user's policy file.
* netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java:
(createMainSettingsPanel, createPolicySettingsPanel) added PolicyPanel
* netx/net/sourceforge/jnlp/resources/Messages.properties: new messages
for PolicyPanel
* netx/net/sourceforge/jnlp/controlpanel/PolicyPanel.java: new panel to
allow launching of external policy editor
* tests/reproducers/simple/CustomPolicies/resources/CustomPolicies.html:
new test to ensure custom user policy files work correctly
* tests/reproducers/simple/CustomPolicies/resources/CustomPoliciesApplet.jnlp
* tests/reproducers/simple/CustomPolicies/resources/CustomPoliciesApplication.jnlp
* tests/reproducers/simple/CustomPolicies/resources/CustomPoliciesJnlpHref.html
* tests/reproducers/simple/CustomPolicies/srcs/CustomPolicies.java
* tests/reproducers/simple/CustomPolicies/testcases/CustomPoliciesTest.java
Diffstat (limited to 'tests/reproducers/simple/CustomPolicies/srcs/CustomPolicies.java')
-rw-r--r-- | tests/reproducers/simple/CustomPolicies/srcs/CustomPolicies.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/reproducers/simple/CustomPolicies/srcs/CustomPolicies.java b/tests/reproducers/simple/CustomPolicies/srcs/CustomPolicies.java new file mode 100644 index 0000000..2446f55 --- /dev/null +++ b/tests/reproducers/simple/CustomPolicies/srcs/CustomPolicies.java @@ -0,0 +1,23 @@ +import java.applet.Applet; +import java.security.AccessControlException; + +public class CustomPolicies extends Applet { + + @Override + public void start() { + System.out.println("CustomPolicies applet read: " + read("user.home")); + System.exit(0); + } + + private String read(String key) { + try { + return System.getProperty(key); + } catch (AccessControlException ace) { + return ace.toString(); + } + } + + public static void main(String[] args) { + new CustomPolicies().start(); + } +} |