Access denied (java.util.PropertyPermission java.home read) from applet

I’'m developing a chat applet for the browser. I use wildfire 3.0 and smack* 2.2.1

The chat applet is included into the html file with

</APPLET

When I try to start the load the page containging this applet, the initialization crashed due to

java.security.AccessControlException: access denied (java.util.PropertyPermission java.home read)[/b]

at java.security.AccessControlContext.checkPermission(AccessControlContext.java:26 4)

at java.security.AccessController.checkPermission(AccessController.java:427)

at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)

at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285)

at java.lang.System.getProperty(System.java:627)

at org.jivesoftware.smack.ConnectionConfiguration.(XMPPConnection.java:164)

at com.applet.jabber.ChatClient.connect(New10Client.java:98)

According to

http://java.sun.com/docs/books/tutorial/deployment/applet/properties.html

(see bottom) no browser let applets read the system property “java.home”.[/b]

Does there exist a workaround?

Hi,

may one ask why you need java.home in your applet? It may be a good idea to change the applet that it does not try to get this value.

LG

I do not need java home!

XMPPConnection con = new XMPPConnection(server,port);

seams to needs java.home in order to get some certificates

Message was edited by: evalentini

see also: (smack: org.jivesoftware.smack.ConnectionConfiguration) (called by XMPPConnection)

public ConnectionConfiguration(String host, int port, String serviceName) {

this.host = host;

this.port = port;

this.serviceName = serviceName;

// Build the default path to the cacert truststore file. By default we are

// going to use the file located in $JREHOME/lib/security/cacerts.

String javaHome = System.getProperty(“java.home”);

StringBuffer buffer = new StringBuffer();

buffer.append(javaHome).append(File.separator).append(“lib”);

buffer.append(File.separator).append(“security”);

buffer.append(File.separator).append(“cacerts”);

truststorePath = buffer.toString();

// Set the default store type

truststoreType = “jks”;

// Set the default password of the cacert file that is “changeit”

truststorePassword = “changeit”;

}

Problem solved by signing the applet

Message was edited by: evalentini