Ошибка Could not create the Java Virtual Machine в Minecraft (Решение)
Ошибка Could not create the Java Virtual Machine в Minecraft — Если вы столкнулись с этой проблемой, то определённо вам необходимо прочитать данную статью, в которой вы найдёте причины и решения этой задачи.
Не правильно вышли из Майнкрафт, из-за чего Java начал вести себя не корректно.
1 Способ: Заходим в папку с игрой, создаём текстовый документ с таким содержанием: «java -Xms650m -jar «c:\Users\USERNAME\AppData\Roaming\.minecraft\minecraft.exe» и сохраняем под таким названием — «minecraft.bat»
USERNAME — Заменить на своего юзера.
Запускаем игру через minecraft.bat.
2 Способ: Заходим в «Мой компьютер», ищем там кнопку «Свойства системы», нажимаем.
В открывшемся окне, нажимаем на «Дополнительные параметры системы».
В новом окне, нажимаем на «Переменные среды».
В очередном окне, нажимаем на кнопку создать, и вписываем параметры со скрина:
Fix: Could Not Create the Java Virtual Machine
Some users are encountering the Could Not Create The Java Virtual Machine error when trying to launch an application that is using Java. This particular issue is reported to occur with Minecraft and several other applications that are built around Java.
Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. The program will exit.
What is causing the Could Not Create The Java Virtual Machine error?
We investigated this particular issue by looking at various user reports and the troubleshooting strategies that they used to resolve the same error message. Based on their conclusions, there are a couple of scenarios that will trigger this particular issue:
- Java is invoked by the wrong arguments or options – This can occur if you’re running a home-brewed application or you’re trying to open an open-source application that is known to cause system instability.
- Java global maximum heap memory is not high enough – One of the most common causes of why you can encounter this particular error is if you try to start a Java application with a maximum heap memory size larger than the one set as the System Variable.
- Java executable and/or application require administrative privileges – This might happen with applications that need admin access in order to function properly.
If you’re currently looking for a way to resolve the, Could Not Create The Java Virtual Machine error, this article will provide you with several verified troubleshooting strategies. Below you have a collection of methods that other users in a similar situation have used to get the issue resolved.
To ensure the best results, follow the methods below in the order that they are presented until you discover a method that is effective in resolving the error for your particular scenario.
Method 1: Adding the _JAVA_OPTIONS to System Variables
Most affected users have managed to get the issue resolved by creating a System Variable for Java called _JAVA_OPTIONS and setting it’s value to Xmx512M. What this essentially does is it sets the global maximum heap memory size for Java.
This will resolve any error message that occurs because the started Java application’s maximum heap memory size is larger than the one set as the System Variable. Several users encountering the same issue have reported that the issue was resolved entirely after they performed the steps below.
Here’s what you need to do to add a _JAVA_OPTIONS entry in System Variables to enlarge the global maximum heap memory size:
- Press Windows key + R to open up a Run dialog box. Then, type “sysdm.cpl” and press Enter to open up the System Properties screen.
- Inside the System Properties screen, go to the Advanced tab and click on Environment Variables.
- In the Environment Variables window, click on New (under System Variables).
- Inside the New System Variable window, set the Variable name to _JAVA_OPTIONS and the Variable value to –Xmx512M and click Ok to save the changes.
- Close the previously opened windows and restart your machine to enforce the changes.
- At the next startup, open the application that was previously showing you the Could Not Create the Java Virtual Machine error and see if is now functioning properly.
If you’re still seeing the same error message at the start of the application, try adding the Java Bin path which might be similar to “%\USER PATH\Java\jdk1.6.0_39\bin” to the environment variable as indicated in the above method and see if that works.
Method 2: Opening java.exe with admin rights
Several users struggling to resolve the same issue have managed to get the issue resolved after forcing the main Java executable (java.exe) to open with administrative privileges.
Some users reported that they were able to resolve the issue after applying this fix on both the main java executable and the executable of the application that is showing the error message.
Here’s a quick guide through the whole thing:
- Open File Explorer and navigate to the location of your java installation. We’ll need to arrive at the location of the main Java executable (java.exe). By default, you should find it in Program Files/Java/*JRE build version*/bin. The exact location will differ depending on which Java Runtime Environment you’re using. Navigate to the location of java.exe
Method 3: Reinstalling Java
In some cases, the error is triggered because Java might not be installed properly or its installation might have been corrupted over time. Therefore, in this step, we will be reinstalling Java after uninstalling it completely. For that:
- Press Windows key + R to open up the Run prompt and type in “Appwiz.cpl”.
Type “appwiz.cpl” into the Run dialog and press Enter
- Press “Enter” and the Programs and Features screen will open up.
- At the Programs and Features screen, scroll through the installed application list until you find Java.
Checking the Programs and features screen
- Right-click on it and select “Uninstall” to remove it completely from the system
- First, delete the primary Java installation and later you should also remove all other Java installations such as updates and other versions.
- After uninstalling all installation, restart your computer.
- After booting up, visit this link and download the latest version of JRE.
- Check to see if the issue persists.
- If the error still persists, download and install the latest version of JDK from here.
Note: If you are already using JDK, try changing its versions or uninstalling the JRE that has been installed along with it. - Verify if the issue still exists.
Method 4: Fixing Errors With Code
There are different reasons behind this error and some of them include if you have some particular errors with your code. We will highlight some below.
- Remove Hyphen: Some users noted that the error was fixed by changing the double hyphen “–” to a single one “-” in their code. For example:
Change the code
“sony@sony-VPCEH25EN:
Could not create the Java virtual machine [Fixed]
The Java virtual machine fatal exception error pops up for some users when they try to launch software built on Java. Minecraft users are no stranger to this issue.
The full error message states: Could not create the Java Virtual Machine. Error: A fatal exception has occurred.
Consequently, the Java program doesn’t run. These are a few potential fixes for the Java Virtual Machine fatal error.
How can I fix the Java virtual machine error?
1. Set up a new system variable for Java
- Open Run with the Windows key + R keyboard shortcut.
- Enter sysdm.cpl in Run and click OK to open the window in the image directly below.
- Select the Advanced tab on that window.
- Click the Environment Variables button to open the window below.
- Click the New button under the System variables box.
- Enter _JAVA_OPTIONS in the Variable name text box.
- Then, enter –Xmx512M in the Variable value text box, which increases RAM allocation to 512 megabytes.
- Click the OK button to close the window.
- Then press the OK button on the Environmental window.
The Java Virtual Machine error often arises when Java needs a larger global maximum heap memory size.
Users have fixed the issue by expanding the maximum RAM allocated to Java. Users can do that by establishing a new Java System Variable as described above.
2. Select the Run as administrator option for Java
- Open Cortana with the Windows key + S keyboard shortcut.
- Enter Java in the search box.
- Then right-click Java and select Open file location to open Java’s folder in File Explorer.
- Now users can right-click the java.exe and select Properties.
- Select the Compatibility tab.
- Select the Run this program as an administrator option.
- Select the Apply option.
- Click OK to close the window.
The Java virtual machine error can also be due to insufficient admin rights. Thus, some users might need to assign admin rights to Java.
Users can assign admin rights to Java in Windows 10 as described above.
3. Reinstall Java
- Reinstalling Java might also fix the Java virtual machine error for some users. First, uninstall the currently installed Java version by entering appwiz.cpl in Run and clicking OK.
- Enter Java in the search box.
- Select Java and click Uninstall.
- Click Yes on any confirmation window that opens.
- Thereafter, restart Windows.
- Then open the Java download page in a browser.
- Users need 32-bit Java for 32-bit programs and 64-bit Java for 64-bit software. If in doubt, your best bet is to download and install both Java versions by clicking Windows Offline and Windows Offline 64-bit.
- Thereafter, open the Java setup wizard.
- Click the Install button on the setup wizard.
So, that’s how users can fix the Java virtual machine fatal error and get back to running the required Java software.
Any of the previously mentioned solutions may be successfully applied in these scenarios:
- Java virtual machine launcher error – This issue arises even if nothing has changed on your computer, and it’s most likely related to Java installation.
- Could not create the Java virtual machine a fatal exception has occurred – 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 – This error shows up when trying to launch Minecraft. The main reason is that it needs admin access in order to function properly.
Use a Java virtual machine online
If you can’t use the Java virtual machine on your PC, you can compile your code straight online.
For instance, a website like Online Java has a very simple interface and the app allows you to compile, run and save your programs very easily without the need for an installation.
Moreover, you also have the option of sharing your code with friends or colleagues who can also make comments on your work and help you.
If you have any other questions or if you have advice for other users to try, don’t hesitate to leave a comment below.
Still having issues? Fix them with this tool:
Fixes to the “Could Not Create the Java Virtual Machine” Error [MiniTool Tips]
You may encounter the “could not create the Java virtual machine” error when you try to start an application that uses Java. This post from MiniTool tells you the reasons for the annoying issue. Besides, you can find some feasible methods to fix it in this post.
Could Not Create the Java Virtual Machine
It’s annoying to encounter the “could not create the Java virtual machine” issue. There are some main reasons for the error: could not create the Java virtual machine.
1. Wrong parameters or options call Java.
2. Java global maximum heap memory is not high enough.
3. Java executable files and/or applications require administrative permissions.
Now, let’s see how to fix the annoying issue.
How to Fix Could Not Create the Java Virtual Machine
Set up a New System Variable for Java
First, you can try to set up a new system variable for Java to fix the “could not create the Java virtual machine” error. Here is how to do that:
Step 1: Press the Windows + R keys at the same time to open the Run dialogue box. Type sysdm.cpl and press Enter to open the System Properties screen.
Step 2: Navigate to the Advanced tab and click the Environment Variables. option.
Step 3: Under the System Variables part, you need to click New. .
Step 4: Set the Variable name to _JAVA_OPTIONS and the Variable value to –Xmx512M and click OK to save the changes.
After that, restart your PC to check if the “could not create the Java virtual machine” error has gone. If not, try the next solution.
Open Java.exe with Admin Rights
Then, you can also try to open Java.exe with admin rights to fix the “could not create Java virtual machine” issue. Follow the steps below to fix that:
Step 1: Type Java in the Search box. Then right-click it and select Open file location to open the Java’s folder in File Explorer.
Step 2: Now you can right-click the java.exe and select Properties.
Step 3: Select the Compatibility tab. Select the Run this program as an administrator option.
Step 4: Select the Apply option and click OK to close the window.
Reinstall Java
The last method for you to fix the “could not create the Java virtual machine” error is to reinstall Java. You can follow the instructions below.
Step 1: Press Win + S to open Search. Then search for Control Panel and launch it.
Step 2: In Control Panel, select View by: Category on the upper right corner. Then click Uninstall a program.
Step 3: Select each Java-related program from the list and then click Uninstall. Follow the on-screen instructions to finish the process.
Step 4: When all the Java programs are uninstalled, restart your computer. Visit the Java official website to reinstall the Java environment.
Then you can check if “could not create the Java virtual machine” error is removed.
Final Words
After reading this post, you should know how to get rid of the “could not create the Java virtual machine” error. If you have any confusion about the methods, leave a comment below and we’ll reply to you as soon.
About The Author
She was graduated from the major in English. She has been the MiniTool editor since she was graduated from university. She specializes in writing articles about backing up data & systems, cloning disks, and syncing files, etc. She is also good at writing articles about computer knowledge and computer issues. In daily life, she likes running and going to the amusement park with friends to play some exciting items.