1

I want my applet to use policy file created under user.home/.java.policy. I'm confused what is the proper argument to use that policy file?

-Djava.security.policy=file:${user.home}/.java.policy

Or

-Djava.security.policy=file:///${user.home}/.java.policy

Or

-Djava.security.policy={user.home}/.java.policy

Or

-Djava.security.policy=({user.home}/.java.policy)
Vicky Thakor
  • 3,847
  • 7
  • 42
  • 67

1 Answers1

0

None of the above. The ones that are legal syntax will all be evaluated by the JSP at the server, using the server user's home directory at the server. None of them gives a URL relative to the applet user's home directory on the client machine. In any case you can't use the -Djava.security.policy form in an applet anyway, at least outside the appletviewer. You have to use the JWS syntax.

user207421
  • 305,947
  • 44
  • 307
  • 483
  • Can you help me with this SOT: http://stackoverflow.com/questions/19401951/java-security-accesscontrolexception-access-denied-java-security-securityperm/19407596?noredirect=1#comment28804373_19407596 and http://stackoverflow.com/questions/19424410/changing-java-policy-file-for-applet – Vicky Thakor Oct 18 '13 at 09:05
  • I don't know what SOT means, but have you considered signing the applet? – user207421 Oct 18 '13 at 09:17
  • SOT: StackOverflow Thread. I tried applet signed using `.pfx` certificate. but not working – Vicky Thakor Oct 18 '13 at 09:19
  • TLA: Three Letter Acronym. We have enough already. Don't invent more, and if you do, don't expect everybody else to know what you're talking about. Don't forget to answer the actual question I asked, instead of perpetrating this futile and irrelevant digression. – user207421 Oct 18 '13 at 09:21