• 0
SpartanChiefXD

"A fatal error has occurred, Java will now close" Problem need help

Question

Hey

 

I've been having this problem recently where I click on my game once in a while and it will come up with an error message saying "Could not create the java virtual machine, Java will now exit"

 

This is extremely annoying and happens without answer or warning

 

Halp, pls, liek, rite nao.

Share this post


Link to post
Share on other sites

11 answers to this question

Recommended Posts

  • 0

I've gotten this problem before if I am using too much RAM on my system to create the Virtual Machine.

 

When you run a Java application (including Minecraft), it runs on a VM that tries to allocate RAM when it is started. By default this is (I think) 512 MB. If it can't claim that much RAM, it gives that error.

 

This can be fixed (assuming this is the problem) by starting it from a batch script using

"C:\Program Files\Java\jre6\bin\javaw.exe" -Xms1G -Xmx2G -jar "C:\Minecraft\Minecraft.exe"

 

Where the first set of " is the path in your system to javaw.exe, and the second set of " is the location of Minecraft.exe on your computer.

 

Xms is the amount of memory to start with, in my case 1GB of RAM. Xmx is the maximum that it may use, although it will only attempt to claim the starting amount.

 

If the default is 512MB and you get that error, try setting it to be -Xms128M -Xmx512M, and see if it doesn't work like that. Alternatively, having less applications, programs, and processes open will do the same thing, but it doesn't let you control the amount Minecraft uses.

 

I had created a pretty basic batch script to accomplish this along with launching different versions of Minecraft. Also allowed me to not be screwed by updates (back when they were automatic), because all I'd have to do is restart the client.

 

Bit advanced, and of course it'd need to be customized a bit to run on anyone else's computer, but for those that want to have a look at it, it's pretty darn basic.

@Echo2852 off


color 0F
title Minecraft Launcher

:home
cls
echo Welcome, %USERNAME%
echo Which version of Minecraft should be started?
echo.
echo 1. 1.4.7 w/ Mods       [JR CURRENT]
echo 2. 1.4.7 Vanilla
echo 3. 1.4.6 w/ Mods
echo 4. 1.4.6 Vanilla
echo 5. 1.4.5 w/ Mods
echo 6. 1.4.5 Vanilla
echo.
echo 90. 1.4.2 for WorldEdit work w/ SPC
echo 91. Start Technic Launcher
echo 92. Start FeedTheBeast Launcher
echo.
echo 0. Cancel
echo.

set /p choice="Enter your choice: "
if "%choice%"=="1" goto 147mod
if "%choice%"=="2" goto 147van
if "%choice%"=="3" goto 146mod
if "%choice%"=="4" goto 146van
if "%choice%"=="5" goto 145mod
if "%choice%"=="6" goto 145van
if "%choice%"=="90" goto 142-SPC
if "%choice%"=="91" goto technic
if "%choice%"=="92" goto ftb
if "%choice%"=="0" exit
echo Invalid choice: %choice%
echo.
pause
cls
goto home

:147mod
COPY "C:\Users\Tim\AppData\Roaming\.minecraft\bin\minecraft147.jar" /y "C:\Users\Tim\AppData\Roaming\.minecraft\bin\minecraft.jar"
goto start

:147van
COPY "C:\Users\Tim\AppData\Roaming\.minecraft\bin\minecraft-1.4.7.jar" /y "C:\Users\Tim\AppData\Roaming\.minecraft\bin\minecraft.jar"
goto start

:146mod
COPY "C:\Users\Tim\AppData\Roaming\.minecraft\bin\minecraft146.jar" /y "C:\Users\Tim\AppData\Roaming\.minecraft\bin\minecraft.jar"
goto start

:146van
COPY "C:\Users\Tim\AppData\Roaming\.minecraft\bin\minecraft-1.4.6.jar" /y "C:\Users\Tim\AppData\Roaming\.minecraft\bin\minecraft.jar"
goto start

:145mod
COPY "C:\Users\Tim\AppData\Roaming\.minecraft\bin\minecraft145.jar" /y "C:\Users\Tim\AppData\Roaming\.minecraft\bin\minecraft.jar"
goto start

:145van
COPY "C:\Users\Tim\AppData\Roaming\.minecraft\bin\minecraft-1.4.5.jar" /y "C:\Users\Tim\AppData\Roaming\.minecraft\bin\minecraft.jar"
goto start

:142-SPC
COPY "C:\Users\Tim\AppData\Roaming\.minecraft\bin\minecraft142-SPC.jar" /y "C:\Users\Tim\AppData\Roaming\.minecraft\bin\minecraft.jar"
goto start

:technic
echo Starting Technic Lanucher...
@Echo2852 off
"C:\Minecraft\TechnicLauncher.exe"
exit

:technicreboot
echo.
echo Reboot?
echo.
echo [1] Reboot
echo [2] Switch JARs
echo [3] Quit
echo.
set /p reboot="Enter your choice: "
if "%reboot%"=="1" goto technic
if "%reboot%"=="2" goto home
if "%reboot%"=="3" exit
echo Invalid choice: %reboot%
echo.
goto technicreboot

:ftb
echo Starting FeedTheBeast Launcher, allocating 1~2GB of RAM.
@Echo2852 off
"C:\Program Files\Java\jre6\bin\javaw.exe" -Xms1G -Xmx2G -jar "C:\Minecraft\FTB_Launcher.exe"
goto ftbreboot

:ftbreboot
echo.
echo Reboot?
echo.
echo [1] Reboot
echo [2] Switch JARs
echo [3] Quit
echo.
set /p reboot="Enter your choice: "
if "%reboot%"=="1" goto ftb
if "%reboot%"=="2" goto home
if "%reboot%"=="3" exit
echo Invalid choice: %reboot%
echo.
goto ftbreboot

:start
echo Starting Minecraft with 1GB ~ 2GB RAM...
@Echo2852 off
"C:\Program Files\Java\jre6\bin\javaw.exe" -Xms1G -Xmx2G -jar "C:\Minecraft\Minecraft.exe"
goto reboot

:reboot
echo.
echo Reboot?
echo.
echo [1] Reboot
echo [2] Switch JARs
echo [3] Quit
echo.
set /p reboot="Enter your choice: "
if "%reboot%"=="1" goto start
if "%reboot%"=="2" goto home
if "%reboot%"=="3" exit
echo Invalid choice: %reboot%
echo.
goto reboot

 

EDIT: WARNING! If you do not have a 64bit OS, you will NOT be able to give any one Java VM more than 1GB of RAM, indifferent of how much you have in the system (although 32bit copies of Windows won't recognize any more than 3GB of RAM anyways). Also of note: in order to use a 64bit OS, you must have a CPU that is capable of using them (almost all newer CPUs can do this, my old crappy Dell could and it was an Intel Core 2 Duo @2GHz).

 

Just forgot to say that, and that could trip people up! :P

 

That was a fun break, now I think I'll have some food before I try to bash dell's website since they refuse to list the technical specs on something I'm trying to list... :3

Share this post


Link to post
Share on other sites
  • 0

This problem is very annoying. It appears to be that when i name the minecraft game on the desktop "Minecraft" just by itself, it gives the error message. Whereas when i name it something else (say Minecraft.exe) it works, but runs on a horrible framerate.


Have you tied to re install Java? 

 Yes, it has no effect.


This is too advanced for me sorry. 

Share this post


Link to post
Share on other sites
  • 0

This is too advanced for me sorry.

Step 1:

   Open Notepad.exe (or a similar program).

Step 2:

   Copy & paste the following line, supposing you're running the newest version of Java (jre7u13):

   "C:\Program Files\Java\jre7\bin\javaw.exe" -Xms128M -Xmx1024M "Minecraft"

   Important! You need to replace Minecraft with the full path to Minecraft.exe on your system. Do NOT replace the quotes.

   Example: "C:\Users\SpartanChiefXD\Desktop\Minecraft.exe"

      Uses "SpartanChiefXD" as the username of your account on your computer, and assumems Minecraft.exe is on your desktop.

Step 3:

   Save it (to your desktop or wherever) as "Play Minecraft.bat"

IMPORTANT!! Make sure you save it as a batch (.bat) file! If you use Notepad.exe, when you go to save, under the filename box, select the type (will usually be 'Text File (*.txt)' or 'Text Document (*.txt)'), and make sure to select "All Files" from that list. Then make sure to add ".bat" to the end of your file name.

Step 4:

   Double-click this file on your desktop to play Minecraft.

Does that make it a little simpler? :)

Share this post


Link to post
Share on other sites
  • 0

so many long replies... it is probably a memory error. meaning you java or (minecrat) is taking up too much "ram" on your computer. you can go on youtube to fond out how to change this. (if you dont know how) Mak sure that you leave at least 1 G of ram for you system process.

Share this post


Link to post
Share on other sites
  • 0

so many long replies... it is probably a memory error. meaning you java or (minecrat) is taking up too much "ram" on your computer. you can go on youtube to fond out how to change this. (if you dont know how) Mak sure that you leave at least 1 G of ram for you system process.

 

Or read Tims reply ;)

Also it could have been a number of things, normally this would be just Java. Anyway, it's all fixed now I believe :D

Share this post


Link to post
Share on other sites
  • 0

Or read Tims reply ;)

Also it could have been a number of things, normally this would be just Java. Anyway, it's all fixed now I believe :D

Considering he never posted again about still having the problem and it's been a month now, I do hope so! XD

Share this post


Link to post
Share on other sites
  • 0

Automatic generated message

This topic has been closed by a moderator or the original user who created the topic.

Reason:

Fixed now ;D Thank you everyone for all your help but to cut a long story short my computer needed fixing because of a BSOD

If you disagree with this action, please click on report and type the reason why it should be left open.

Regards,

The JRTeam

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.