使用separate_jvm开始在个别JVM中的小程序并不总是工作 [英] Using separate_jvm to start applet in individual JVMs not always working

查看:176
本文介绍了使用separate_jvm开始在个别JVM中的小程序并不总是工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个小程序,采取所以我们想使每个实例都有自己的JVM与separate_jvm启动它= TRUE的内存相当数量的(而不是共享一个),所以我们不耗尽内存在重复调用。这适用于我们的发展盒,但未能在客户的计算机上。

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.

是否有此安全原因呢?

这是一个有符号和放大器;信任的小程序,我们正在做的3D渲染。

This is a signed & trusted applet as we're doing 3d rendering.

推荐答案

我是$的Sun Java 6 Update 10的安装在客户端的电脑p $ psume。如果没有,你很可能迫使小程序<一个href=\"http://java.sun.com/javase/6/docs/technotes/guides/jweb/applet/applet%5Fdeployment.html#JRE%5FVERSION\">run在JVM的版本是ATLEAST 6u10中。我不确定如果找不到JVM的所需版本显示将要抛出的错误,或者错误消息。

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.

除此之外,存在不保证单独的JVM实例将被创建时的<一个href=\"http://java.sun.com/javase/6/docs/technotes/guides/jweb/applet/applet%5Fdeployment.html#SEPARATE%5FJVM\">separate_jvm参数是在APPLET标签中指定。

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.

的唯一保证是该applet将在其自己的JVM与其他小程序分开运行。如果一个JVM已经可用,如果没有小程序已经在该JVM被加载,则有可能为JVM加载在已初始化JVM实例的小程序。

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.

对于Sun Java 6的U10发行说明,以下要点是值得一读:

For the Sun Java 6 u10 release notes, the following salient points are worth reading:

下面是<一个粗略的一套准则href=\"http://java.sun.com/javase/6/docs/technotes/guides/jweb/applet/applet%5Fdeployment.html#JAVA%5FARGUMENTS\">the 6u10中发行说明,新的JVM实例共享和创建:

Here is a rough set of guidelines from the 6u10 release notes, for the sharing and creation of new JVM instances:


  • 如果用于启动preexisting JVM实例的命令行参数的要求参数的超集,则preexisting JVM实例将被使用。

  • 如果一个JVM实例推出的默认设置的命令行参数(即那些在Java控制面板中指定,没有指定java_arguments),那么这个JVM实例将永远不会被用来发动任何小程序,必须通过指定java_arguments连一个命令行参数。

  • -Xmx被特殊处理:如果preexisting JVM实例是通过java_arguments启动例如-Xmx256m,和一个新的applet请求-Xmx128m,那么新的小程序很可能会在preexisting JVM上运行实例。换句话说,-Xmx规格与一个大于或 - 等于测试匹配。

因此​​,最好的办法是提供java_arguments在applet标记,例如,有一个单独的JVM启动小程序的几率非常高。

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开始在个别JVM中的小程序并不总是工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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