JAVA_OPTS for increasing heap size

后端 未结 1 1254
别跟我提以往
别跟我提以往 2021-02-12 22:05

I want to increase my Heap size. How can I use JAVA_OPTS for doing so.I am getting the following error may be this is because of low heap size

UNEXPECTED TOP-LEV         


        
相关标签:
1条回答
  • 2021-02-12 22:20

    You should be able to use the information found in this post.

    -Xmszzzm
    

    where zzz is your minimum size.

    -Xmxzzzm
    

    where zzz is your maximum size.

    JAVA_OPTS="-Xms128m -Xmx512m"
    

    You can find more info on VM args here.

    How to set it globally in your environment depends on your operating system. Which OS are you using?

    EDIT: I see the "ubuntu" tag now.

    You should just be able to put the JAVA_OPTs line in etc/environment. Once you modify etc/environment, you'll have to log out and back in for the updated environment variables to take effect.

    0 讨论(0)
提交回复
热议问题