Troubleshooting guide for the Java Virtual Machine error
Do you get a "Could Not Create the Java Virtual Machine" error whenever you try to play Minecraft? This annoying error could point to a few solutions, so try as many as you need to in order to get rid of the error. Read on to learn multiple ways that you can fix the Java Virtual Machine on your computer.
Ways to Fix the Minecraft Java Virtual Machine Error
- Create a new system variable with the name "_JAVA_OPTIONS" and the value "-Xmx1024M."
- Right-click the Java.exe file on your computer and check the "Run as administrator" box to always run it with administrator permissions.
- Re-install Java to get rid of any corrupted files and stay up-to-date.
Steps
Section 1 of 4:
Adding New System Variables
-
Press ⊞ Win and search edit the . If you type after pressing the Win key, you can start a search for anything on your computer.
- Doing this will list search results that include "edit the" on your computer.
-
2Click the search result called "Edit the system environment variables". A "System Properties" window will open.
- You can also get here by pressing Win + R and entering sysdm.cpl . Pressing Enter will open the "System Properties" window.
Advertisement -
3Click Environment Variables . It's inside the Advanced tab if you don't immediately see it at the bottom of the window.
-
4Click New… under "System variables". It's the 2nd big box, towards the bottom of the page.
-
5Change the appropriate system variables. Enter _JAVA_OPTIONS for "Variable name" and -Xmx1024M for "Variable value". You must use the same capitalization and punctuation.
-
6Press OK to save and close the window. You'll see the new variable in the "System variables" section.
- Close all the windows by clicking the X in the top right corner, then restart your computer.
Advertisement
Section 2 of 4:
Running Java as Administrator
-
1Search Java.exe . This will display every "Java.exe" file on your computer.
-
2Right-click the first result and select Open file location . You can also skip the search if you know where the file is located on your computer.
-
3Right-click the "java.exe" file and select Properties . Right-clicking it opens a menu at your cursor with more options, and clicking "Properties" opens a new window.
-
4Click the Compatibility tab. This lists a bunch of compatibility features.
-
5Click to check the box next to "Run this program as an administrator." Checking this box makes the program run as an administrator every time it opens, which will eliminate a lot of errors.
-
6Click Apply and OK . This will close the window. Click the X in the top right corner to close other windows.
Advertisement
Section 3 of 4:
Re-installing Java
-
Open Settings. Press Win + I .
- Do this after trying the other steps, which should eliminate the error message.
- This is more likely to help if you have corrupted or broken Java files that trigger the error, as well as an older version of Java that no longer works.
-
2Click Apps and go to "Installed apps". This will list every installed program on your computer.
-
3Uninstall Java. For Windows 10, click Java and select Uninstall . For Windows 11, click the three dots next to Java and select Uninstall .
-
4Visit the official Java Runtime Environment page and download Java. Open it in your web browser.
- Click Download Java for Desktops to find the download page.
- Click Download Java for Desktops again to save the installation file. The best one for your operating system is automatically selected.
-
5Run the downloaded file to install Java. Once done, Java has been reinstalled and any corrupted files that caused the "Could Not Create the Java Virtual Machine" are gone.
- Restart your computer after reinstalling Java.
Advertisement
Expert Q&A
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Tips
Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
References
- ↑ https://www.reddit.com/r/Minecraft/comments/143peo9/im_getting_error_could_not_create_the_java/
- ↑ https://www.reddit.com/r/javahelp/comments/1damm83/i_need_help_with_the_error_could_not_create_the/
- ↑ https://www.reddit.com/r/PrismLauncher/comments/1ixy769/eli5_how_to_fix_could_not_create_the_java_virtual/
About This Article
Thanks to all authors for creating a page that has been read 24 times.
Advertisement