$ java -version
Error occurred during initialization of VM
Could not reserve space for ObjectStartArray
$ java -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
There can be several reasons behind this and increasing the heap size and permgen size of the JVM often fixes this issue.
However, such errors can still occur even if the heap size and other JVM parameters have been setup correctly. In such cases, the issue is often with the system level configuration.
On Linux, this issue can occur if the virtual memory size limit is not sufficient enough. To fix this:
- On RHEL, execute: limit vmemoryuse unlimited
- In bash, execute: ulimit -v unlimited