SecurityException异常在我的Java小程序 [英] SecurityException on my java applet
问题描述
我收到 java.lang.SecurityException异常:权限被拒绝:文件:////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.
下面是小程序code:
Here is the applet code:
<applet code="Screenshot" archive="file:////Videos/public/scripts/screenshot.jar" width="100px" height="100px">
</applet>
我已经签署使用此三步骤引导小程序,但它似乎没有它的工作对我来说,因为我仍然得到错误。
的http://www.narendranaidu.com/2007/11/3-easy-steps-to-self-sign-applet-jar.html
推荐答案
您的jar URL看起来很奇怪。个人而言,我从来没有见过有人试图从非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粘贴到您的网页浏览器,看看会发生什么。如果你能够直接下载jar文件,而无需输入密码,当URL放入applet标记这应该工作。否则也不会。因此,首先检查您的网址并解决它的问题。
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.
这篇关于SecurityException异常在我的Java小程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!