Error occurred during initialization of VM Could not reserve enough space for object heap

Error message:

Error occurred during initialization of VM
Could not reserve enough space for object heap

The Java Virtual machine (JVM) allocates more memory than the system has available, so there is not enough space for the JVM to create objects
Solution: You can see how much system memory is left on your machine to ensure that it is large enough to boot Java with -XMx512m-xMS512m-xx :MaxPermSize=256M
Such as Eclipse:
Set the appropriate parameters for the JVM (smaller than the current one)
(1) Click “Window-> Preferences-> Java-> Installed JREs “can be seen in all JRE’s.
(2) Click the JRE currently in use, and then click “Edit” on the right.
(3) Is the “Default VM Arguments” configuration parameter value of the JRE: -XMx512m-xms512m-xx :MaxPermSize=256M.

Read More: