Vadiklk
Vadiklk

Reputation: 3764

SecurityException on my java applet

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

Upvotes: 0

Views: 428

Answers (1)

AlexR
AlexR

Reputation: 115328

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.

Upvotes: 1

Related Questions