Share this article
This article is translated in
Improve this guide
Could Not Create the Java Virtual Machine: 4 Easy Fixes
Don’t hesitate to take a closer look at our quick solutions
4 min. read
Updated onFebruary 21, 2024
updated onFebruary 21, 2024
Share this article
This article is translated in
Improve this guide
Read our disclosure page to find out how can you help Windows Report sustain the editorial teamRead more
The Java virtual machine fatal exception error pops up for some users when they try to launch software built on Java.Minecraftusers are no strangers to this issue.
The full error message states:Could not create the Java Virtual Machine. Error: A fatal exception has occurred. This is due to memory size issues and incorrect path settings or corrupt files.
How do I fix Could not create the Java Virtual Machine error?
1. Remove JDK (Java Development Kit)
That’s it! Our readers pointed out that it was the development kit that conflicted with the process and led to theCould not create the Java Virtual Machineerror, anduninstalling the programdid the trick.
2. Set up a new system variable for Java
Importantly, note that instead of using a double hyphen in the Variable value as stated above, you can use a single hyphen (-Xmx512M) as this is often more effective, and would not spark up other complications.
3. Select the Run as administrator option for Java
The Java Virtual Machine error can also be due to insufficient admin rights. Thus, some users might need to assign admin rights to Java. You can try the steps below to apply this solution.
-
Press theWindowskey +Skeyboard shortcut, and enterJava. Right-click onJavaand selectOpen file locationto open Java’s folder in File Explorer.
-
Right-clickjava.exeand selectProperties.
-
Head to theCompatibilitytab and select theRun this program as an administratoroption.
-
Select theApplyoption, and clickOKto close the window.
4. Reinstall Java
That’s how users can fix this fatal error and get back to running the required Java software.
Do I need to install JVM?
Any machine on which you want to run Java code must have the Java Runtime Environment (JRE) installed. This is because Java does not run natively on a computer as C++ or C does; instead, someone must translate Java’s instructions into machine code, which the JVM does.
This error may come in different shades, including Could not create the Java Virtual Machine in Android Studio, Docker, Pentaho, Elasticsearch, Sonarqube, Minecraft, Eclipse, React Native, and IntelliJ, yet rest assured that you’ll find our solutions useful.
Any of the previously mentioned solutions may be successfully applied when getting aJava virtual machine launchererrorwhich arises even if nothing has changed on your computer, and it’s most likely related to Java installation.
Things are no different when it comes to theCould not create the Java virtual machine a fatal exception has occurrederror. This problem also seems to appear randomly. Make sure you aren’t using a 32-bit VM and a 64-bit Eclipse.
Minecraft could not create the Java virtual machine is an error that shows up when trying to launch Minecraft. The main reason is that it needsadmin accessin order to function properly. Also, read our detailed guide on how toinstall Java on Windows 11.
If you have any other questions or advice for other users to try, don’t hesitate to leave a comment below.
More about the topics:Java,Minecraft Issues
Matthew Adams
Windows Hardware Expert
Matthew is a freelancer who has produced a variety of articles on various topics related to technology. His main focus is the Windows OS and all the things surrounding it.
He is passionate about the tech world, always staying up-to-date with the latest and greatest. With an analytical view, he likes problem-solving, focusing on errors and their causes.
In his free time, he likes to read and write about history and tries to always develop new skills.
User forum
5 messages
Sort by:LatestOldestMost Votes
Comment*
Name*
Email*
Commenting as.Not you?
Save information for future comments
Comment
Δ
Matthew Adams
Windows Hardware Expert
He is passionate about everything surrounding Microsoft’s OS, focusing on troubleshooting guides & tips for everyday problems.