0

I am getting the java.lang.SecurityException: Permission denied: file:////Videos/public/scripts/screenshot.jar when I try to use an applet.

Here is the applet code:

<applet code="Screenshot" archive="file:////Videos/public/scripts/screenshot.jar" width="100px" height="100px">
</applet>

I've signed the applet using this 3-step guide, but it doesn't seem it worked for me, as I am still getting the error. http://www.narendranaidu.com/2007/11/3-easy-steps-to-self-sign-applet-jar.html

1
  • Its very difficult to tell from the info that you have provided. Are you sure the sign process completed successfully? Commented Feb 17, 2012 at 7:59

1 Answer 1

1

Your jar URL looks strange. Personally I have never seen that somebody tries to download applet from URL other than HTTP. Actually it means that your applet will work only for users that are into your LAN where they have access to shared computer named "Videos". Are you sure this is what you want?

The second thing is: try to just copy and paste the JAR URL to your web browser and see what will happen. If you are able to download the jar file directly without entering password this should work when URL is placed into the applet tag. Otherwise it will not. So, first check your URL and fix its problem.

Sign up to request clarification or add additional context in comments.

3 Comments

"Personally I have never seen that somebody tries to download applet from URL other than HTTP." It is part of a bigger problem of putting an absolute path, that should be a relative path. But yes, trying to load the file off the local disks of the end user is unusual (will not work in the real world), and might be causing the strange behavior observed. OP - are you seeing a security prompt to trust the applet?
I am checking it on my localhost, and it doesn't work even here
What is the new applet HTML? Please add it as an edit to the question and notify me of an update.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.