My Oracle Support Banner

Troubleshooting Java SE - "Error Occurred During Initialization of VM: Could not reserve enough space for object heap" (Doc ID 1260764.1)

Last updated on OCTOBER 21, 2022

Applies to:

Java SE JDK and JRE - Version 6 to 8
Information in this document applies to any platform.

Purpose

This troubleshooting guide should help you to diagnose an issue that occurs right after you try to start a Java program; even when "java -version" quits.  Dependent on the Java version, the error message that you get is either this three line error message

 

Troubleshooting Steps

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Purpose
Troubleshooting Steps
 1. Check whether -Xmx has been set explicitly or not (32 bit or 64 bit JVM)
 3. Check whether the value for -Xmx  has been set too large (32-bit JVM only)
 4. Check whether the system is low on virtual memory (32-bit or 64-bit JVM)
 5. Check Limitations on the System Resources in the current shell (Linux and Solaris only)
 5.1 In which shell does the application run?
 5.2 Check if the Virtual Memory Limit is set too small
 5.3 Check if the stack size is set to unlimited (Solaris SPARC only)
 6. Check Solaris Resources
 6.1. Process control which limits the process size
 
6.2. Check zone configuration which limits physical/swap
 7. Check for Linux kernel specific bugs
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.