aspose file tools*
The moose likes Applets and the fly likes Applet and ClassPathResource problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet and ClassPathResource problem" Watch "Applet and ClassPathResource problem" New topic
Author

Applet and ClassPathResource problem

David Woon
Greenhorn

Joined: Feb 05, 2010
Posts: 3
Please help me. When I call following code:



error occur as following:

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41906
    
  63
Applets don't have access to most system properties for security reasons; it looks like the Apache Commons Logging library is not compatible with that. Generally that makes sense, since most logging goes to files, and applets can't access the local file system.


Ping & DNS - my free Android networking tools app
David Woon
Greenhorn

Joined: Feb 05, 2010
Posts: 3
so... how to solve this problem?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41906
    
  63
Do you need to use Spring?

Alternatively, if the applet really does so much that Spring is called for, then a signed applet (or JavaWebStart application) may be more appropriate. Signing would get around the security restrictions.
Jadson Santos
Greenhorn

Joined: May 16, 2011
Posts: 1


First of all, you need to signed your Applet to Access local files.


In second, "Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission org.apache.commons.logging.LogFactory.HashtableImpl read"

is a error in the commons-logging-1.1.jar, I updated to commons-logging-1.1.1.jar and revolved the problem of AccessControlException.
 
Don't get me started about those stupid light bulbs.
 
subject: Applet and ClassPathResource problem