Modify JVM args from inside the JVM

前端 未结 7 1233
野的像风
野的像风 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:33

    You cant change those options simply because it compromises the security of the system.

    If an admin wishes to only allow a certain program to have certain capaibilities by setting a security manager, it would be a serious problem if you could turn that off.

    Anyway a program should not be changing stuff like its memory requirements at runtime - these should be known and setup by the administrator. There is no reason why your program should need to do this at runtime. If it really needs to change this perhaps the reason qustion is why doesnt the admin type dude not do it ?

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