Could not reserve enough space for object heap

后端 未结 26 1611
余生分开走
余生分开走 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:46

    Combined with -Xmx512M use -d64 to make sure you're running 64-bit VM. On a 64-bit machine I thought for sure I was running 64-bit virtual machine, but no. After installing 64-bit Java the -d64 option works and -Xmx allows much larger memory sizes.

    java -d64 -Xmx512M mypackage.Test
    

提交回复
热议问题