All i have a strange problem with my RMI client, i am trying to connect to the jboss which has been started in my VM by eclipse, when i try and access it i get the following error.
java.security.AccessControlException: access denied (java.util.PropertyPermission java.security.policy write) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264) at java.security.AccessController.checkPermission(AccessController.java:427) at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
System.setProperty("java.security.policy", "client.policy"); if (System.getSecurityManager() == null) System.setSecurityManager(new RMISecurityManager()); Properties env = new Properties(); // Definir las propiededes y ubicacion de busqueda de Nombres JNDI. env.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); env.setProperty("java.naming.provider.url", "localhost:1099"); env.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming"); InitialContext ic = new InitialContext(env);
Any got any ideas on this ?