On the Internet, I was able to find only the restriction of arguments when starting from the command line.
Is it possible to set a limit inside the code at runtime?
During program execution, it is not possible to adjust the -Xmx
and -Xms
. They can only be set before starting work.
But the question arises: why is it necessary? You can choose the appropriate parameters before starting the program. For example, allocate the maximum available memory to the application.
Or, alternatively, run a new process at runtime and set new JVM parameters.
java <параметры JVM> -jar app.jar
- Pavel ParshinSource: https://ru.stackoverflow.com/questions/489771/
All Articles