how to increase java heap memory permanently?

前端 未结 5 1723
南笙
南笙 2020-12-02 23:14

I have one problem with java heap memory. I developed one client server application in java which is run as a windows service it requires more than 512MB of memory. I have 2

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-02 23:59

    This worked for me:

    export _JAVA_OPTIONS="-Xmx1g"

    It's important that you have no spaces because for me it did not work. I would suggest just copying and pasting. Then I ran:

    java -XshowSettings:vm

    and it will tell you:

    Picked up _JAVA_OPTIONS: -Xmx1g

提交回复
热议问题