aspose file tools*
The moose likes Applets and the fly likes load image: AccessControlException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "load image: AccessControlException" Watch "load image: AccessControlException" New topic
Author

load image: AccessControlException

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
I want to load an image from remote website in JApplet. But I got error.

The coding is
image = Toolkit.getDefaultToolkit().getImage("http://news.bbc.co.uk/media/ddd.jpg");

The error message is

------------
java.security.AccessControlException: access denied (java.io.FilePermission http://news.bbc.co.uk/m3body.jpg read)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:269)
at java.security.AccessController.checkPermission(AccessController.java:
401)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
at sun.awt.SunToolkit.getImageFromHash(SunToolkit.java:472)
at sun.awt.SunToolkit.getImage(SunToolkit.java:486)
at MyPaintApplet.init(MyPaintApplet.java:34)
at sun.applet.AppletPanel.run(AppletPanel.java:354)
at java.lang.Thread.run(Thread.java:534)


------------

How could I solve this problem?
 
wood burning stoves
 
subject: load image: AccessControlException