强制小程序加载到同一个 JVM 实例中? [英] Force applets to load in same JVM instance?

查看:27
本文介绍了强制小程序加载到同一个 JVM 实例中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我接管了一个旧 Web 应用程序的维护工作,该应用程序使用嵌入在同一网页中的多个小程序.这曾经工作得很好,但由于引入了下一代 Java 插件(~1.6.0_10),不能保证单个小程序加载到同一个 JVM 实例中.如果它们加载在不同的 JVM 中,它们将无法通过 AppletContext.getApplets() 或静态变量进行通信.

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.

有什么办法可以强制小程序加载到同一个 JVM 实例中?我看到了一个提到的解决方法,其中指定相同的java_arguments"参数可能会鼓励 Java 插件在同一个 JVM 实例中运行小程序,但这对我们的应用程序不起作用(并且在任何情况下都不受 Oracle 官方支持,因此可能会消失任何时间在任何情况下).

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).

我们还尝试用小程序到 JavaScript 到小程序的间接通信替换直接小程序到小程序的通信,但我们不能使用这种方法,因为我们的客户使用旧的网络浏览器版本,这阻止了它的工作.如果可能的话,我很想避免通过非本地服务器路由所有本地小程序到小程序的通信.

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.

推荐答案

我们遇到了类似的问题,并通过在 Java 控制面板中禁用下一代"Java 插件来解决该问题.

We had a similar problem and worked around it by disabling the "next-generation" Java plugin in Java control panel.

这篇关于强制小程序加载到同一个 JVM 实例中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆