Is there a way to change jvm args from inside jvm? In particular, I want to be able to change the maximum jvm heap size from the inside. Is it possible?
Change I think I should add the reason I wanted to do this. I have several Java programs that run on different computers / platforms. These programs have configurations that are received at runtime and vary depending on the machine / environment in which the program runs. Some of these configurations can be changed at run time, and various programs automatically update themselves as configurations change.
I wanted the heap size to be one of these configuration parameters that was obtained at runtime, like the rest of the configuration. If so, then the program can start (with some default arguments to jvm), and then configure itself based on the extracted config.
source share