Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cannot load images thru an applet

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Because my p.c is semi incapacitated (i cannot view embedded applet), I have had to use a java PROGRAM to test my app (by spawning the app in a frame).

When i try to view the embedded applet thru another p.c - i get the message:

Exception occurred during event dispatching: java.security.AccessControlException: access denied (java.io.FilePermission read)

I'm pretty darn sure this if to do with file permissions, but i thought that a java applet would only need permission to write to a file located online.

Any help to resolve this would be much appreciated.
 
Applets work in a "Sandbox". This is for security reason since they can be embeded into webpages. If you are running a applet in a webpage it can access files on the server that it resides on. If you are using the jdk's appletviewer then you only have access to files on your system. And all of that is dependent on the settings in the systems local "java.policy" file.

I answered how to do this in another thread, click the link below to go there:

I hope this helps...

Rodney
 
Have fixed this by loading the graphics thru the applet class itself - thank for the help.

I do have another problem however.... ...the drawImage function is not drawing anything at all from the paint method. It seems rather odd since i've done everything to set up the image the standard way.
 
I have cleared up the problem now - everything works fine - thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top