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

后端 未结 7 1873
抹茶落季
抹茶落季 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:47

    If you want any java process, not just ant or Tomcat, to pick up options like -Xmx use the environment variable _JAVA_OPTIONS.

    In bash: export _JAVA_OPTIONS="-Xmx1g"

提交回复
热议问题