Why does Minecraft get stuck when javaw.exe reaches 757.356kb of memory use?

Solution 1:

New answer, so everyone can follow the steps:

  1. Open up a notepad.

  2. Type the following:

    C:\Program Files\Java\jre6\bin\java" -Xms2048M -Xmx2048M -jar "C:\minecraft.jar"

  3. File -> Save as. Choose All file types, and save it like: C:\minecraft.bat

  4. Get minecraft's "linux version" at http://minecraft.net. Save it to C:\minecraft.jar [This step is not necessary for jre7 running on Windows 7, you can point the script to minecraft.exe]

  5. You can skip this step if you are running 32 bit windows! Get a 64-bit Java runtime. This wouldn't be a neccessary step, but since Minecraft is a resource hog, you may want to squeeze out all the juice from your computer. You can find the 64-bit version here.

  6. Double-Click the minecraft.bat file.

What does the .bat file do?

  • The first part tells Windows, when you double-click the .bat, it should launch Java runtime
  • The second part is the -Xmx and -Xms part. These are settings for the heap size. Set these according how much memory you have. Explanation for this Heap stuff.
  • The last part -jar C:\... is an argument too, telling Java where it can find the Minecraft.jar launcher.

(Also, check the C:\minecraft.jar, C:\Program Files\Java\jre6\bin\java.exe paths. These things may vary.)


A little extra, performance improvement: (The argument part works only on Windows!)
Add the following arguments to the .bat file: "C:\Program Files\Java\jre6\bin\java" -Dsun.java2d.noddraw=false -Dsun.java2d.d3d=true -Dsun.java2d.opengl=false -Xms2048M -Xmx2048M -jar "C:\minecraft.jar"

This way, we tell Java it should use DirectX to draw. This helped me a lot.

Another improvement can be achieved (Cross-platform!) if you install Java JRE7. It's in a beta state, but perfect for us, playing Minecraft. You only have to modify the .bat file, so it shows:
C:\Program Files\Java\jre7\bin\java instead of the
C:\Program Files\Java\jre6\bin\java (Notice the number in the "jre".)