How do I set Java's min and max heap size through environment variables?

后端 未结 7 1865
抹茶落季
抹茶落季 2020-11-29 00:48

How do I set Java\'s min and max heap size through environment variables?

I know that the heap sizes can be set when launching java, but I would like to have this ad

7条回答
  •  一整个雨季
    2020-11-29 01:22

    You can't do it using environment variables. It's done via "non standard" options. Run: java -X for details. The options you're looking for are -Xmx and -Xms (this is "initial" heap size, so probably what you're looking for.)

提交回复
热议问题