JOSM Webstart fails at loading plugins
|Reported by:||stoecker||Owned by:||team|
JOSM Webstart does not have rights to load plugins.Probably this is a solution:
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");
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.