Modify JVM args from inside the JVM

前端 未结 7 1291
野的像风
野的像风 2020-12-21 07:39

Is there a way to modify the jvm args from inside of the jvm? Specifically, I want to be able to change the maximum heap size of the jvm from inside of it. Is this possibl

7条回答
  •  悲哀的现实
    2020-12-21 08:20

    With JRockit you can at least suggest a heap size.

    JVMFactory.getJVM().getMemorySystem().suggestHeapSize(100*1000*1000);
    

    See JMAPI for more information

提交回复
热议问题