Sign in to follow this  

[java] Applet Security Problem

This topic is 4244 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm new to Applets and I would like to make an applet that will allow visitors to my site to view a slideshow of images. I want the applet to load all image files that are in the same directory as the applet (on my server). How can I do it? I understand that applets have a lot of security implications, but it seems like I should be able to read a local file. Currently I am getting the following error message: java.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read). Any help is appreciated.

Share this post


Link to post
Share on other sites
Because the applet is running on the user's machine, "local files" actually means the files on the user's machine, which (correctly) applets can't get access to without being signed and so forth.

What you can do is load the images from your server instead. I can't remember off the top of my head, but if I'm sure there'll be a tutorial on the Sun site.

Share this post


Link to post
Share on other sites
Thanks bleb, that really helps. I didn't realize it was running on the user's computer. If anyone knows of a good demo showing an applet loading server-side files I would appreciate a link.

Thanks

Share this post


Link to post
Share on other sites

This topic is 4244 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this