ubuntu/firefox 上的 liveconnect

发布于 2024-11-16 11:18:07 字数 507 浏览 9 评论 0原文

这适用于Windows上的chrome canary/firefox 4等:

getAppletContext().showDocument(new URL("javascript:alert('hello');"));

但在firefox 4 ubuntu上它除了抛出java.net.MalformedURLException:未知协议:javascript之外什么也不做,

它不会在Windows上抛出此异常。

关于如何实现这项工作有什么想法吗?甚至使用 Calling JS from Applet: MalformedURLException: 中的第一个答案忽略异常:未知协议:javascript JavaScript 不运行

This works on chrome canary/firefox 4 etc on windows:

getAppletContext().showDocument(new URL("javascript:alert('hello');"));

but on firefox 4 ubuntu it does nothing but throw java.net.MalformedURLException: unknown protocol: javascript

It does not throw this exception on Windows.

Any ideas on how to make this work? Even ignoring the exception using the first answer from Calling JS from Applet: MalformedURLException: unknown protocol: javascript the javascript does not run

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

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

发布评论

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

评论(1

等风也等你 2024-11-23 11:18:07

解决方案是删除iceatea java插件包,并从规范合作伙伴存储库安装sun-java6-jre和sun-java6-plugin。

The solution was to remove the iceatea java plug-in package, and install sun-java6-jre and sun-java6-plugin from canonical partners repository.

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