使用separate_jvm在各个JVM中启动applet并不总是有效
我有一个小程序,它需要相当多的内存,所以我们想用separate_jvm = true来启动它,这样每个实例都有自己的JVM(而不是共享的),这样我们就不会在重复调用时耗尽内存。这在我们的开发盒上有效,但在我们客户的计算机上失败。
这有安全原因吗?
这是一份签名&当我们进行 3D 渲染时,这是值得信赖的小程序。
I have an applet that takes a fair amount of memory so we want to start it with separate_jvm = true so that each instance gets its own JVM (rather than a shared one) so we don't run out of memory upon repeated invocations. This works on our development boxes, but fails on our clients' computers.
Are there security reasons for this?
This is a signed & trusted applet as we're doing 3d rendering.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我假设您的客户计算机上安装了 Sun Java 6 update 10。如果没有,您可能可以强制小程序 在版本至少为 6u10 的 JVM 中运行。我不确定如果找不到所需版本的 JVM,将引发什么错误或显示的错误消息。
除此之外,不能保证在 separate_jvm 参数在 APPLET 标记中指定。
唯一的保证是该 applet 将在与其他 applet 分开的自己的 JVM 中运行。如果 JVM 已经可用,并且该 JVM 中尚未加载 applet,则 JVM 可以在已初始化的 JVM 实例中加载 applet。
对于 Sun Java 6 u10 发行说明,以下要点值得一读:
以下是来自 6u10 发行说明,用于共享和创建新的 JVM 实例:
因此,最好的办法是在 applet 标记中提供 java_arguments,这样就很有可能在单独的 JVM 中启动 applet。
I would presume that Sun Java 6 update 10 is installed on your client's computers. If not, you could probably force the applet to run in a JVM whose version is atleast 6u10. I'm unsure about the error that will be thrown, or the error message displayed if the required version of the JVM is not found.
Apart from that, there is no guarantee that a separate JVM instance will be created when the separate_jvm parameter is specified in an APPLET tag.
The only guarantee is that the applet will run in its own JVM separated from other applets. If a JVM is already available and if no applet has been loaded in that JVM, then it is possible for the JVM to load the applet in the already initialized JVM instance.
For the Sun Java 6 u10 release notes, the following salient points are worth reading:
Here is a rough set of guidelines from the 6u10 release notes, for the sharing and creation of new JVM instances:
The best bet therefore is to provide java_arguments in the applet tag, such that there is a very high probability of launching the applet in a separate JVM.
separate_jvm
参数是在 1.6u10 中引入的。如果您客户的 JVM 比该值更旧,则该参数将被忽略。The
separate_jvm
parameter was introduced in 1.6u10. If your customer's JVM is any older than that, the parameter will be silently ignored.