Loading Image Files in an Unsigned Applet from the Server

Sorry, i didn't find a proper Forum.

I want to load Image Files from the Server in the JApplet -

but everytime i try i get the message:

/Schadenskizze/classes/applet/pics/szenarios

access denied (java.io.FilePermission \Schadenskizze\classes\applet\pics\szenarios read)

in the Internet Explorer Java Console. I thought loading files is just forbidden if you load it from the Client...

Could someone help me ?

[452 byte] By [Cheiron86a] at [2007-10-2 7:06:50]
# 1
This should work:URL u = new URL(this.getCodeBase(),"../RelativePath/filename.txt");URLConnection uc = u.openConnection();InputStream in = uc.getInputStream();
harmmeijera at 2007-7-16 20:38:39 > top of Java-index,Security,Signed Applets...
# 2
thx, how do i get the File - Object from there on ? cause i am tryin to read a directory file and i need the listFiles() method to get the subdirectories and files.
Cheiron86a at 2007-7-16 20:38:39 > top of Java-index,Security,Signed Applets...
# 3

you cannot read the directory content from an applet.

When the applet resides on a web server I hope you can understand why

directory listing is an unwanted feature.

When the applet resides on the local filesystem (opened from for example C:\temp) it can still not read a directory listing, as with applets opened from the

web you can access resources when you know the location, it is not possible to

list them.

harmmeijera at 2007-7-16 20:38:39 > top of Java-index,Security,Signed Applets...
# 4
It works when the applet is local....Too make listenenig a directory in a webserver possible i need to sign it right ?... this would be extremly important, since im working on this applet over 3 month .....
Cheiron86a at 2007-7-16 20:38:39 > top of Java-index,Security,Signed Applets...
# 5
another option would be to create a config file which contains all paths to the files i would like to open.
Cheiron86a at 2007-7-16 20:38:39 > top of Java-index,Security,Signed Applets...