使用 Java Web Start/JNLP 启用 JVM 选项

发布于 2024-09-15 06:28:53 字数 139 浏览 2 评论 0原文

我正在创建一个 Web Start 应用程序,它将受益于一些较新的 JVM 选项(特别是逃逸分析、G1 垃圾收集器等)。

同时,我希望该应用程序能够在不支持这些选项的旧版 JVM 上正常工作选项。

有没有一个好的方法来实现这一目标?

I'm creating a Web Start application which would benefit from some of the newer JVM options (especially escape analysis, G1 garbage collector etc.)

At the same time, I would like the application to work gracefully on older JVMs that do not support these options.

Is there a good way of achieving this?

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

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

发布评论

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

评论(1

凶凌 2024-09-22 06:28:53

正如 Thorbjørn 提到的,Java 6 u10 允许在 JNLP 中使用多个 j2se 元素。 JNLP 文件语法< /strong> 最新 Java Web Start 开发人员指南resources 部分表示多个 j2se 元素,每个元素都有 java-vm-args 属性可以指定最优先出现的属性。例如:

<j2se version="1.3" initial-heap-size="64m" max-heap-size="128m"/>
<j2se version="1.4.2+" href="http://java.sun.com/products/autodl/j2se" 
      java-vm-args="-esa -Xnoclassgc"/>

As Thorbjørn mentioned, Java 6 u10 allows multiple j2se elements in JNLP. The JNLP File Syntax resources section of the latest Java Web Start Developer's Guide, indicates that multiple j2se elements, each with java-vm-args attributes can be specified with the most preferred occurring first. For example:

<j2se version="1.3" initial-heap-size="64m" max-heap-size="128m"/>
<j2se version="1.4.2+" href="http://java.sun.com/products/autodl/j2se" 
      java-vm-args="-esa -Xnoclassgc"/>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文