Error: Could not create the Java Virtual Machine.

3 posts / 0 new
Last post
Last seen: 1 year 5 months ago
Joined: 11/19/2015 - 03:02
Gems: 0
Error: Could not create the Java Virtual Machine.

When I try to make anything (Item, block, mob exc.) It makes it seem as if it made it properly but as soon as I check the log it shows two errors. I never thought much of this to start but after I spent around two hours making a block to my specific needs it said I needed to deleted all of my stuff to get MCreater to work, so I did and nothing changed, I still get the errors. If anyone knows how to fix this please let me know, I checked all around the forums and couldnt find anything.



Executing gradle command: clean build
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
C:\Pylo\MCreator160>cd forge
C:\Pylo\MCreator160\forge>SET "JAVA_HOME=C:\Pylo\MCreator160\jdk\"
C:\Pylo\MCreator160\forge>SET JAVA_EXE=%JAVA_HOME%\bin\java.exe
C:\Pylo\MCreator160\forge>SET PATH=%JAVA_HOME%\bin\;%PATH%
C:\Pylo\MCreator160\forge>SET "JAVA_OPTS=-Xmx1556m -Xms128m"
C:\Pylo\MCreator160\forge>gradlew clean build
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Task completed with return code 0 in 315 milliseconds
Task return code check OK!

Last seen: 12 months 2 days ago
Joined: 03/01/2016 - 12:21
Gems: 0
I had the same problem and i

I had the same problem and i found a fix! Go into Preferences top right and on the gradle jvm turn your ram down! i turned it down to 664. hope this helps :)


Last seen: 1 month 1 week ago
Joined: 04/15/2017 - 12:08
Gems: 1
Most of the time you can fix

Most of the time you can fix this problem by uninstalling the Java runtime and then reinstalling it all over again.  

To do this, go to the control panel and then Programs and Features. If you’re running Windows 8.1 Update 1, just right-click on the Start button and click on Programs and Features. Locate the Java runtime, uninstall it and reboot your PC.

Next, download the latest Java Runtime from, taking care to install the correct version for your PC. You will likely want the 32-bit version as the 64-bit option is specifically for 64-bit browsers. Most browsers are 32-bit on Windows, even on 64-bit editions of the OS.

Sometimes this error can be caused by not having enough system memory allocated to the Java Virtual Machine – or not enough system memory full stop.  

You can also try increasing the amount of system memory allocated to the Java virtual machine by setting an environment variable.

To do this, go back to the Control Panel and click on System, then Advanced system settings. Now click the Environment Variables button to bring up a list of all those currently set.