Could not reserve enough space for object heap

后端 未结 26 1838
余生分开走
余生分开走 2020-11-22 05:59

I am getting the following exception repeatedly each time I try to run the program.

Error occurred during initialization of VM

Could not reserve e

26条回答
  •  天命终不由人
    2020-11-22 06:35

    If you're running 32bit JVM, change heap size to smaller would probabaly help. You can do this by passing args to java directly or through enviroment variables like following,

    java -Xms128M -Xmx512M
    JAVA_OPTS="-Xms128M -Xmx512M"
    

    For 64bit JVM, bigger heap size like -Xms512M -Xmx1536M should work.

    Run java -version or java -d32, java--d64 for Java7 to check which version you're running.

提交回复
热议问题