Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-08-2008, 11:10 PM
Member
 
Join Date: Dec 2007
Posts: 81
willemjav is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
applets on mac whatīs going on? willemjav Java Applets 6 04-19-2008 08:03 PM
applets & threads willemjav Java Applets 2 04-04-2008 07:59 AM
problem with applets.. sireesha New To Java 1 03-21-2008 06:42 AM
one more try, applets security willemjav Java Applets 0 03-09-2008 02:19 PM
Applets and dll peiceonly Java Applets 1 04-01-2007 11:16 AM


All times are GMT +3. The time now is 01:35 PM.


VBulletin, Copyright Đ2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright Đ2006 - 2007, www.java-forums.org