Could not reserve enough space for object heap




Contents of page :
  • 2) Now, we will pass VM parameters to java program to produce - Error occurred during initialization of VM - Could not reserve enough space for object heap
  • 3) Solution of problem - Could not reserve enough space for object heap >



How to pass vmArgs(JVM parameters) to java program in eclipse



2) Now, we will pass VM parameters to java program to produce - Error occurred during initialization of VM - Could not reserve enough space for object heap >

Pass VM/JVM parameters -Xms
E:\>java -Xms512g MyJavaProgram
Error occurred during initialization of VM
Could not reserve enough space for object heap

E:\>



Xms is minimum heap size which is allocated at initialization of JVM in java.

Xms set is too high.

Currently Xms (minimum heap size) is set to 512 gigabyte.



3) Solution of problem - Could not reserve enough space for object heap>


Decrease Xms size.

We have set Xms (minimum heap size) to 512 megabytes.

This value may depend on your system configuration, so adjust accordingly.

E:\>java -Xms512m MyJavaProgram
This is my Java Program

E:\>








SUMMARY>
So in this core java tutorial we learned how to solve Error occurred during initialization of VM - Could not reserve enough space for object heap.


Having any doubt? or you liked the tutorial! Please comment in below section.
Please express your love by liking JavaMadeSoEasy.com (JMSE) on facebook, following on google+ or Twitter.



RELATED LINKS>

What is eclipse.ini file? How to pass vmargs to java program in eclipse? Changing the eclipse setting, What are best eclipse setting?



Labels: Core Java
eEdit
Must read for you :