This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 41060
    
  43
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: 41060
    
  43
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.
 
wood burning stoves
 
subject: Applet and ClassPathResource problem
 
Similar Threads
file reading in applet
load jpcsc library fails
WAMP/Java/MysqlConnector Issue
While loading page error from console
Cannot take populate JTextfield