Applet 可以在 IE 中运行,但不能在 Firefox 中运行

发布于 2024-10-19 12:09:57 字数 244 浏览 3 评论 0原文

所以我创建了一个小程序,它在本地硬盘上创建一个文件,并最终将其上传到我创建的 CGI。

当在 IE 上运行时,该小程序工作正常,并正确创建和上传文件。 但是,在 Firefox 上,我在 Java 控制台上收到错误“访问被拒绝”,表明它根本无法创建该文件。我自己创建了证书,没有购买证书或通过公司进行验证。

我需要一个适用于任何可能使用该小程序的人的解决方案,这意味着修复不能只是编辑我自己的设置,除非我可以对每台接受证书的计算机执行此操作。

So I have created an applet that creates a file on the local hard drive, and eventually uploads it to a CGI that I have created.

When run on IE, the applet works fine, and creates and uploads the file properly.
However, on firefox, I get an error on the Java Console, access denied, showing me that it simply can't create the file. I created the certificate myself, and did not buy one or have it verified through a company.

I need a solution that will work for anybody who potentially uses the applet, meaning the fix can't just be editing my own settings, unless I can do that with every computer that accepts the certificate.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

指尖凝香 2024-10-26 12:09:57

未签名的小程序无法在所有浏览器上访问本地磁盘。它在 IE 中对你有用,因为我相信你是从文件系统(而不是通过 http)运行它的。因此,正确的解决方案是不要在磁盘上创建文件。在内存中创建内容并上传。但请记住:您只能连接到下载小程序的服务器。

如果您确实必须创建本地文件,则必须对该小程序进行签名。

Unsigned applets cannot access local disk on all browsers. It worked for you in IE because I believe that you ran it from file system (not via http). So, the right solution is not to create file on disk. Create content in memory and upload it. But remember: you can connect only to server the applet was downloaded from.

If you really have to create local file you have to sign the applet.

仄言 2024-10-26 12:09:57

可能需要进行一些设置。原因之一可能是您的 Mozilla Firefox 未启用 java。
检查以下链接:

要测试 Web 浏览器中是否启用了 java,请单击 [此处]

May be, some setting has to be done. One of the reason could be your Mozilla Firefox is not java enabled.
Check the following links :

To test whether java is enabled or not in a web browser, click [here]

忘东忘西忘不掉你 2024-10-26 12:09:57

此错误可能相关。

它指出 Firefox 会杀死加载时间过长的 Java 小程序。我有一个示例,从本地资源加载时工作正常,但在远程时失败。有时,重新打开小程序可以使其正常工作,因为它似乎每次都会加载越来越多的类。

This bug may be relevant.

It states that Firefox kills java applets that take too long to load. I have an example that works fine when loaded from a local resource but fails when it is remote. Sometimes, reopening the applet can make it work as it appears that it loads more and more of the classes each time.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文