简体   繁体   English

Java Web 启动应用程序中的 JVM Args

[英]JVM Args in java web start application

I have a Javafx application which is deploybed via java webstart.我有一个通过 java webstart 部署的 Javafx 应用程序。

I need to pass GC vm args for the application and I have issues in doing so.我需要为应用程序传递 GC vm args,但我在这样做时遇到了问题。

I have the following in my jnlp我的 jnlp 中有以下内容

<j2se version="1.8+" href="http://java.sun.com/products/autodl/j2se" initial-heap-size="1024m" max-heap-size="1024m" java-vm-args="-XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -XX:+DisableExplicitGC"/>

When the application starts, it looks like most of them are not passed to the VM当应用程序启动时,看起来大部分都没有传递给 VM

ps -ef | ps-ef | grep java gives the below output grep java 给出以下输出

133768645 2448 1 0 4:31PM ttys020 0:37.80 /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -XX:+DisableExplicitGC -XX:CMSInitiatingOccupancyFraction=75 -Xmx1g -Xms1g 133768645 2448 1 0 4:31PM ttys020 0:37.80 /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -XX:+DisableExplicitGC -XX:CMSInitiatingOccupancyFraction=75 -Xmx1g -Xms1g

The min & max heap gets set as expected but not all the other VM arguments.最小和最大堆按预期设置,但不是所有其他 VM 参数。

Can u please let me know why the other vm args are not being passed to the VM?你能告诉我为什么其他虚拟机参数没有传递给虚拟机吗? Am I doing something wrong?难道我做错了什么?

Appreciate your help.感谢你的帮助。

Thanks谢谢

Make sure your jnlp file that you changed is the one javaws is using.确保您更改的 jnlp 文件是 javaws 正在使用的文件。 If it has an href attribute in the jnlp file header, it will take the jnlp file from there even if you launch it from your local machine.如果它在 jnlp 文件头中有一个 href 属性,即使您从本地计算机启动它,它也会从那里获取 jnlp 文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM