Java: failed to reserve enough space for a bunch of objects

I am trying to allocate 2 gigabytes of ram for a java application launched from a bat file using this line of code:

@echo off "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xmx2G -Xms1G -jar craftbukkit-1.2.5-R4.0.jar pause 

When I try to run it like this, it spits out an error:

  Error occurred during initialization of VM Could not reserve enough space for object heap Could not create teh Java virtual machine Press any key to continue . . . 

I currently have 8 gigabytes of bar on my computer, and I know that I use a maximum of 3 concerts at any time (I let the computer sit for the most part, just by running this server file). I have 2x4gig sticks from a bar, so I know that it has not been separated, and I know that I have enough free sheep to distribute so why not let me? I can allocate 1536M (1.5 gigs) and lower, but if I switch to 2G, it will give me this error. Any help is appreciated

+6
source share
2 answers

You have to make sure that you are using the 64-bit version of the java-32-bit version, you will not be able to select as much even in 64-bit windows

+6
source

you just need to provide more space for tomcat. for this you need to go to the tomcat directory in it "bin" than go to the setenv.bat file and then increase the size "MaxPermSize = 256 m", 512 m will be enough

0
source

Source: https://habr.com/ru/post/918323/


All Articles