What "Could Not Create JVM" means and why it happens
The "Could Not Create JVM" error means your computer cannot start the Java Virtual Machine — the program that runs Java applications. This happens most often because Java is not installed, your computer does not have enough memory set aside for Java, or Java cannot find the right system files it needs to start.
The error appears when you try to launch a Java program, an IDE like Eclipse or IntelliJ, or a tool that depends on Java running in the background. The message usually stops the program from opening at all, so nothing else can happen until you fix it.
The good news is that this error has a small number of real causes, and each one has a straightforward fix. You do not need to be a programmer to work through them — just follow the steps in order and test after each one.
Key Takeaways
- The error usually means Java is not installed, not set up correctly, or does not have enough memory assigned to it.
- Check whether Java is installed on your computer first, because nothing else will work without it.
- If Java is installed, increase the memory limit in your program's configuration file or settings.
- Make sure your JAVA_HOME path points to the correct Java folder, because programs cannot find Java if the path is wrong.
- Reinstalling Java completely often fixes the error when other steps do not work.
Check whether Java is installed
Before you change any settings, confirm that Java actually exists on your computer. Open a command prompt or terminal window and type this command, then press Enter:
java -version
If Java is installed, you will see a version number like "java version 17.0.1" or "openjdk version 11.0.13". If you see "java is not recognized" or "command not found", Java is not installed or your computer cannot find it. Go to the "Install or reinstall Java" section below.
If you do see a version number, write it down — you will need it later if the error continues. Then move to the next section.
Increase the memory limit for your program
Java programs often fail to start because they do not have enough memory (RAM) set aside. Each Java program has a maximum memory limit, and if that limit is too low, the JVM cannot start.
The fix depends on which program is giving you the error. If it is an IDE like Eclipse, IntelliJ, or NetBeans, look for a file called eclipse.ini, idea.vmoptions, or netbeans.conf in the program's installation folder. Open the file in a text editor like Notepad.
Find the line that starts with -Xmx (it looks like "-Xmx512m" or "-Xmx1024m"). This line sets the maximum memory. Change the number to something larger — try doubling it. If it says "-Xmx512m", change it to "-Xmx1024m". If it says "-Xmx1024m", change it to "-Xmx2048m". Save the file and restart the program.
If you are running a Java program from the command line, you can add the memory limit directly in the command. Instead of typing java -jar myprogram.jar, type java -Xmx1024m -jar myprogram.jar. The "-Xmx1024m" part tells Java to use up to 1024 megabytes of memory.
Set the JAVA_HOME path correctly
Programs find Java by looking for a path called JAVA_HOME, which points to the folder where Java is installed. If this path is wrong or missing, programs cannot locate Java even though it is on your computer.
On Windows, right-click "This PC" or "My Computer" on your desktop, select "Properties", then click "Advanced system settings". Click "Environment Variables" at the bottom. Under "System variables", click "New" and create a variable named JAVA_HOME. For the value, enter the path to your Java folder — it usually looks like C:\Program Files\Java\jdk-17.0.1 or C:\Program Files (x86)\Java\jdk1.8.0_291. The exact path depends on which version of Java you installed and where Windows put it.
To find the correct path, open File Explorer and navigate to C:\Program Files\Java. Look for a folder that starts with "jdk" or "jre". That folder name is what goes in JAVA_HOME. Copy the full path, paste it into the Environment Variables window, and click OK.
On Mac or Linux, open a terminal and type which java. This shows the path to Java. Then open your shell configuration file (usually ~/.bash_profile, ~/.bashrc, or ~/.zshrc depending on your system) in a text editor and add this line:
export JAVA_HOME=/path/to/your/java
Replace "/path/to/your/java" with the actual path. Save the file, close your terminal, and open a new one so the change takes effect.
Install or reinstall Java
If Java is not installed or if the fixes above did not work, download and install Java fresh. Go to oracle.com/java/technologies/downloads or adoptium.net (which offers free, open-source Java). Both sites let you download the version you need.
Most people should download the latest Long Term Support (LTS) version, which is stable and supported for years. As of now, LTS versions include Java 17 and Java 21, but check the download page to see what is current.
Download the installer for your operating system (Windows, Mac, or Linux) and run it. Follow the on-screen steps and let it install to the default location — do not change the folder path unless you have a specific reason to. Once the installer finishes, restart your computer.
After restart, open a command prompt or terminal again and type java -version to confirm the installation worked. Then try opening the program that was giving you the error.
Check your system has enough total memory
Sometimes the error happens because your entire computer is running low on RAM, not just because one program does not have enough. If you have set a high memory limit for Java but your computer only has 4 gigabytes of RAM total, Java still cannot start.
On Windows, right-click the taskbar and select "Task Manager". Click the "Performance" tab and look at the "Memory" section. You will see how much RAM you are using and how much you have total. If the number is close to your total (for example, 3.8 GB out of 4 GB), close other programs and try again.
On Mac, open "Activity Monitor" from Applications > Utilities. Click the "Memory" tab at the top. Look at the number next to "Memory Used" and compare it to your total RAM. If most of your RAM is in use, close other programs first.
If your computer consistently runs out of memory, you may need to reduce the memory limit you set for Java in the earlier step, or consider adding more RAM to your computer.
Verify the Java installation is not corrupted
Occasionally Java files become corrupted during installation or an update, and the JVM cannot start even though Java appears to be installed. The fastest way to fix this is to uninstall Java completely and install it again.
On Windows, go to Settings > Apps > Apps and Features, find "Java" in the list, click it, and select "Uninstall". Follow the prompts to remove it completely. Then download and install Java again from the sources listed in the previous section.
On Mac, open Finder, go to Applications, find the Java folder or any Java-related applications, and drag them to the Trash. Then empty the Trash. Download and install Java again.
On Linux, use your package manager. For Ubuntu or Debian, type sudo apt-get remove openjdk-* to remove all Java versions, then sudo apt-get install openjdk-17-jdk to install a fresh copy.
After reinstalling, restart your computer and test the program again.
Frequently Asked Questions
Does "Could Not Create JVM" mean my computer is broken?
No. The error is almost always a configuration problem — Java is missing, not set up correctly, or does not have enough memory. Your computer itself is fine. Once you install Java or adjust the settings, the error goes away.
Why does the error happen even though I installed Java before?
Java updates sometimes break the JAVA_HOME path, or a program's memory limit setting gets reset. Reinstalling Java or updating your environment variables usually fixes it. You can also check whether a Java update happened recently by looking at your system's update history.
What is the difference between JDK and JRE?
JRE (Java Runtime Environment) runs Java programs. JDK (Java Development Kit) includes the JRE plus tools for writing and compiling Java code. If you are just running a Java program, JRE is enough. If you are writing Java code or using an IDE, download the JDK instead.
Should I use Oracle Java or OpenJDK?
Both work. Oracle Java is the official version but requires a license for commercial use. OpenJDK (available from Adoptium or Eclipse Temurin) is free and open-source. For most people, OpenJDK is the simpler choice and has no restrictions.
The error still happens after I tried all these steps. What do I do?
Check the full error message — it often contains more details about what went wrong. Search for the exact error message online, because specific versions of Java or specific programs sometimes have known issues with documented workarounds. You can also try a different version of Java (for example, switch from Java 17 to Java 11) to see whether the problem is version-specific.