I am trying to run java command in linux server it was running well but today when I tried to run java I got some error-

Error occurred during initialization of VM

Could not reserve enough space for object heap

Could not create the Java virtual machine.

my memory space is -

root@vps [~]# free -m
         total       used       free     shared    buffers     cached
Mem:     8192        226       7965          0          0          0
    -/+ buffers/cache:        226       7965
Swap:            0          0          0

How can I solve this problem.

  • What are the -Xmx and -Xms parameters that you start your JVM with? – Dabu Jun 29 '11 at 7:14

This error can occur when ulimits are set. What's the output of ulimit -a?


Restart(reboot) system or server it will work well.

  • Are you serious? Rebooting is a temporal solution imo. – Lucas Kauffman Jul 20 '12 at 18:25
  • Glad you resolved this issue. Please be sure to mark your answer as "accepted" when you are able. – jscott Jul 23 '12 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.