开发者

Enabling JVM options with Java Web Start / JNLP

I'm creating a Web Start application which woul开发者_StackOverflowd 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?


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"/>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜