user01 user01 - 1 month ago 14
Java Question

How to resolve this : "Error occurred during initialization of VM; Could not reserve enough space for object heap"

I am trying to start my database server from command prompt in Windows. But I receive the following error:


Error occurred during initialization of VM

Could not reserve enough space for object heap


However the attempt is successful if I log off and log on again or restart. I think it is because of insufficient RAM in my computer (1GB).

How can I resolve this issue?

Please retag if I have tagged it wrong. Thanks!

Answer

Try changing the memory settings of the VM. see here how to pass this as command-line arguments. For example

java -Xmx512m -Xms256m ....

If, however, your machines does not have enough RAM to handle this, the only resolution is to buy more RAM. It might still be possible to make it run with tweaking the above settings - I once spent half an hour trying to run an application with a limited amount of RAM by experimenting with different values for Xmx and MaxPermSize.