Ticket #2297 (closed defect: fixed)
JOSM Webstart fails at loading plugins
| Reported by: | stoecker | Owned by: | team |
|---|---|---|---|
| Priority: | major | Component: | Core |
| Version: | latest | Keywords: | webstart |
| Cc: |
Description
JOSM Webstart does not have rights to load plugins.Probably this is a solution: http://lopica.sourceforge.net/faq.html
iceryx reports: The classes I loaded with my own URLClassLoader didn't have the same permissions as the classes loaded directly through Web Start. So I included my own policy file in a jar to grant java.security.AllPermissions to all codebases. Then in my main class, I wrote:
URL policyUrl = Thread.currentThread().getContextClassLoader().getResource("my.java.policy"); Policy.getPolicy().refresh();
This fixed it. I guess that when you give "all-permissions" to your Web Start app, it assigns java.security.AllPermissions only to code loaded from the Web Start codebase, but not to code from other codebases. Changing the policy widened this permission to everything.
As another alternative you can also write your own Policy subclass permitting everything and then call Policy.setPolicy() to turn it on.
