强制小程序加载到同一个 JVM 实例中?
我接管了一个旧 Web 应用程序的维护工作,该应用程序使用嵌入在同一网页中的多个小程序。这曾经工作得很好,但自从引入了下一代 Java 插件 (~1.6.0_10) 后,不保证各个小程序能够加载到同一个 JVM 实例中。如果它们加载在不同的 JVM 中,则它们无法通过 AppletContext.getApplets() 或静态变量进行通信。
有什么方法可以强制小程序加载到同一个 JVM 实例中吗?我看到提到的一种解决方法,其中指定相同的“java_arguments”参数可能会鼓励 Java 插件在同一个 JVM 实例中运行小程序,但这对我们的应用程序不起作用(并且在任何情况下都不受 Oracle 官方支持,因此可能会消失任何无论如何,时间)。
我们还尝试用间接的 applet 到 JavaScript 到 applet 的通信来替换直接的 applet 到 applet 的通信,但是我们不能使用这种方法,因为我们的客户使用旧的 Web 浏览器版本,这阻止了这种方法的工作。如果可能的话,我希望避免通过非本地服务器路由所有本地小程序到小程序的通信。
I've taken over maintenance of an old web application, which uses multiple applets embedded in the same web page. This used to work fine, but since the Next Generation Java plugin was introduced (~1.6.0_10) the individual applets are not guaranteed to load in the same JVM instance. If they load in different JVMs, they cannot communicate through AppletContext.getApplets() or through static variables.
Is there any way we can force the applets to load in the same JVM instance? I saw a workaround mentioned where specifying identical 'java_arguments' parameter may encourage the Java plugin to run applets in the same JVM instance, but this does not work for our application (and in any case is not officially supported by Oracle and hence may disappear any time in any case).
We've also tried replacing direct applet-to-applet communication with indirect applet-to-JavaScript-to-applet communication, but we can't use this approach as our clients use old web browser versions which prevent this from working. I'd be keen to avoid routing all local applet-to-applet communication through a non-local server if at all possible.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们遇到了类似的问题,并通过在 Java 控制面板中禁用“下一代”Java 插件来解决该问题。
We had a similar problem and worked around it by disabling the "next-generation" Java plugin in Java control panel.