Results 1 to 1 of 1
Thread: applets canīt be tricked
- 03-08-2008, 10:10 PM #1
Senior Member
- Join Date
- Dec 2007
- Location
- Spain
- Posts
- 573
- Rep Power
- 6
applets canīt be tricked
Dear hardwired
1) In order to trick the applet I created, like you suggested, a second class and triggered the fileloader method from its constructor:
private Image downloadImage(String filename) {
URL url;
url = getClass().getResource("Imagestore/" + filename);
try {
images = ImageIO.read(url);
} catch (IOException ex) {
JOptionPane.showMessageDialog(infoPane, "can not read file " + ex);
}
}
2) I created an object of the second class inside the applet init (?)
3) and tried to get the files etc. through public get-methods.
It still isnīt working. I believe the problem is and was the applet.policy file.
The console says:
java.security.AccessControlException: access denied (java.io.FilePermission Imagestore read)
at java.security.AccessControlContext.checkPermission (AccessControlContext.java:264)
at java.security.AccessController.checkPermission(Acc essController.java:427)
at java.lang.SecurityManager.checkPermission(Security Manager.java:532)
at java.lang.SecurityManager.checkRead(SecurityManage r.java:871)
at java.io.File.isDirectory(File.java:721)
at LoadImages.readImageFilelist(LoadImages.java:132)
at LoadImages.<init>(LoadImages.java:51)
at Slides.init(Slides.java:71)
at sun.applet.AppletPanel.run(AppletPanel.java:380)
at java.lang.Thread.run(Thread.java:613)
I`ll keep on trying
willemjav
Similar Threads
-
problem with applets..
By sireesha in forum New To JavaReplies: 3Last Post: 05-21-2009, 03:36 PM -
applets on mac whatīs going on?
By willemjav in forum Java AppletsReplies: 6Last Post: 04-19-2008, 07:03 PM -
applets & threads
By willemjav in forum Java AppletsReplies: 2Last Post: 04-04-2008, 06:59 AM -
one more try, applets security
By willemjav in forum Java AppletsReplies: 0Last Post: 03-09-2008, 01:19 PM -
Applets and dll
By peiceonly in forum Java AppletsReplies: 1Last Post: 04-01-2007, 10:16 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks