Java application to use maximum available memory in the system

前端 未结 2 844
终归单人心
终归单人心 2021-01-03 03:55

There are -Xmx and max-heap-size (jnlp) options to set maximum memory java application can use.
If these options are not specified application is permitted to use only s

相关标签:
2条回答
  • 2021-01-03 04:21
    -XX:DefaultMaxRAMFraction=1
    

    bugs.sun.com
    Sun's 1.5 JVM
    Default Heap Size

    Doesn't work for web start.

    0 讨论(0)
  • 2021-01-03 04:46

    Unfortunately, the best way I'm aware of is to write a simple launcher (possibly a shell script or batch file) that inspects the system, determines an appropriate value for -Xmx, and then launches the Java application. Once the JVM has initialized, it is not possible to change the values.

    0 讨论(0)
提交回复
热议问题