我的 Java 小程序上的 SecurityException [英] SecurityException on my java applet

查看:49
本文介绍了我的 Java 小程序上的 SecurityException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用小程序时,我收到 java.lang.SecurityException: Permission denied: file:////Videos/public/scripts/screenshot.jar.

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

这是小程序代码:

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

我已使用此 3 步指南签署了小程序,但它似乎对我不起作用,因为我仍然收到错误消息.http://www.narendranaidu.com/2007/11/3-easy-steps-to-self-sign-applet-jar.html

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

推荐答案

您的 jar 网址看起来很奇怪.就我个人而言,我从未见过有人试图从 HTTP 以外的 URL 下载小程序.实际上,这意味着您的小程序仅适用于局域网中的用户,他们可以访问名为视频"的共享计算机.你确定这是你想要的吗?

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?

第二件事是:尝试将 JAR URL 复制并粘贴到您的 Web 浏览器,看看会发生什么.如果您可以在不输入密码的情况下直接下载 jar 文件,则在将 URL 放入小程序标签时,这应该可以工作.否则不会.因此,请先检查您的网址并解决其问题.

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.

这篇关于我的 Java 小程序上的 SecurityException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆