Can I set Java max heap size for running from a jar file?

后端 未结 8 1789
刺人心
刺人心 2020-11-28 10:16

I am launching a java jar file which often requires more than the default 64MB max heap size. A 256MB heap size is sufficient for this app though. Is there anyway to speci

8条回答
  •  庸人自扰
    2020-11-28 11:07

    Apparently this works on Ubuntu

    > export _JAVA_OPTIONS="-Xmx1g"
    

    java -jar jconsole.jar & Picked up _JAVA_OPTIONS: -Xmx1g

提交回复
热议问题