Error occurred during initialization of VM - Too small initial heap


Contents of page :
  • 2) Now, we will pass VM parameters to java program to produce - Error occurred during initialization of VM Too small initial heap
  • 3) Solution of problem - Error occurred during initialization of VM Too small initial 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 Too small initial heap>

Pass VM/JVM parameters -Xms

E:\>java -Xms512 MyJavaProgram
Error occurred during initialization of VM
Too small initial heap

E:\>


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

Xms set is too low.

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




3) Solution of problem - Error occurred during initialization of VM Too small initial heap>


Increase Xms size.

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

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

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

E:\>





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




SUMMARY>
So in this core java tutorial we learned how to solve Error occurred during initialization of VM - Too small initial 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>

Learn how to pass vmargs (VM parameters) to java program in eclipse?



No comments:

Post a Comment