简体   繁体   English

Java Applet安全性问题

[英]Java Applet Security Issues

I'm having a lot of difficulty getting an applet I made to run in a web browser. 要在网络浏览器中运行小程序,我遇到了很多困难。 Java security keeps blocking it. Java安全性一直在阻止它。 I have the jar sitting on my desktop and I made a simple html file that embeds the jar using . 我将jar放在桌面上,并制作了一个简单的html文件,该文件使用嵌入了jar。 I'm trying to embed this in html for my website. 我正在尝试将其嵌入html文件中。 I don't have any root access to the site at all so I want to avoid using Web Start and Apache Tom Cat stuff because it seems those tutorials assume you're uploading the app itself to the directory of the site itself. 我根本没有对该站点的任何根访问权限,因此我想避免使用Web Start和Apache Tom Cat之类的东西,因为这些教程似乎都假定您将应用程序本身上传到该站点本身的目录中。 I can only embed html here, so I have a jar located in my googledrive.com/host that I'm trying to link. 我只能在此处嵌入html,因此我要链接的googledrive.com/host中有一个jar。

Here's the code for the tag. 这是代码的代码。

<applet  
    codebase="https://bb2f18b1cb19b925c50b747c1c65afcc4ad11720.googledrive.com/host/0B34NA0csYJZufm5ZeFFEcUMyQnR5bmw1eVl2M3BOcXItNGxxZTZvaFExNVhXQnY4dzY3QTg"  
    archive="AsteroidGameApp.jar"  
    code="asteroidgame.AsteroidGame.class" 
    width=500 
    height=500>
</applet>

I don't even know if it would run correctly or not because I can't get past the security. 我什至不知道它是否可以正确运行,因为我无法超越安全性。 I've read stuff about getting the code signed but I can't find a clear tutorial how to do that. 我已经阅读了有关使代码签名的内容,但是找不到清晰的教程。

As reported on the Java related site Starting with Java 7 Update 51, trying to run unsigned Java applications generates error messages and prevents executing the applet. 正如Java相关站点从Java 7 Update 51开始所报告的那样,尝试运行未签名的Java应用程序会生成错误消息并阻止执行小程序。

Follow the instructions about the Oracle proper solution (I my experience I had to get a valid certificate from a trusted root like Verisign and then used this certificate to sign my applet jar) but if you can't do this way, try the suggested workaround in the correspondent section. 按照有关Oracle适当解决方案的说明进行操作(根据我的经验,我必须从受信任的根目录(如Verisign)获得有效的证书,然后使用该证书对我的applet jar进行签名),但是如果您不能这样做,请尝试建议的解决方法在相应的部分。

Obviously, as stated by the Java site: 显然,如Java网站所述:

It is highly recommended not to run these types of applications. 强烈建议不要运行这些类型的应用程序。 However if you still want to run these apps, run only if you understand the risks and implications. 但是,如果仍然要运行这些应用程序,则仅在了解风险和含义后才能运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM