***THIS POST IS FOR WINDOWS VISTA 64 USERS, THOUGH IT MIGHT WORK FOR YOU, TOO. THIS IS A STEP-BY-STEP SOLUTION TO THE COMMON JAVA MEMORY CRASH SO MANY HAVE SPENT HOURS TRYING TO RESOLVE***
Ok, so I started this post because of the frustration I'd had in trying to get Minecraft up and running, Java crash free. I'm going to tell you, first, the problem I was having with the game so you can determine if MY problem sounds like YOUR problem. Then, I'm going to lay out how I FIXED the problem specifically, as, from the massive amounts of research I did, I can tell that there are a lot of questions, but very few answers that worked. I'm sorry if this will be somewhat lengthy and lacking in bullet points, but I'll do my best to make the layout as quick-to-read as possible. btw, ignore all the videos online: they're a waste of your time.
So, first, the PROBLEM.
I've owned MC since ver 1.3 something. With the update that followed shortly after, my MC kept crashing after several minutes of play. This was more likely to happen the further out from zero spawn I was or the more screenshots I would take in one playthrough. In older versions, the game would just crash to desktop. Double-click MC icon, I'm back in the game for 5-10 minutes, !BOOM! crash.
With later versions MC was nice enough to tell me that I had java memory issues, but I was like "Memory issues?? wtf, I have 6gigs of DDR3 and a 1.75gig o' RAM BFG Nvidia card, running on a core i7." When the full release came out, 1.8, my game would crash every 30 seconds to 2 minutes. The solution to this was easy: clean wipe and reinstall of the game, but the memory issue continued to plague me, and still I crashed every 5-10 minutes. (Didn't stop me from building a masterpiece, but this was getting old). It was time for a solution.
So, the SOLUTION.
1) First of all, if you're frustrated beyond belief, I suggest you start with a fresh install of the most recent version of the MC EXE (http://www.minecraft.net/download). Download, put this first instance of the EXE wherever (don't listen to people's crap about it having to be on your desktop; that's just silly), and run it for the first time, so that, once logged in, the game has to download all the necessary files.
2) Next, you'll need to download the JAR file from the website. ***Please please PLEASE make backup copies of all original files. These files are not hard to retrieve if you screw up the original, but keeping a backup of original files is good practice. I generally make a new folder called ORIGINAL and toss a copy of the files I'm going to change in there.*** Just so no one's lost, go to (http://www.minecraft.net/download), click the SHOW ALL PLATFORMS link, and there you'll see the Minecraft.jar file. Save this file in your %appdata%-->Roaming-->.minecraft-->bin folder, and overwrite the original JAR file. If you can't find this folder, then click RUN in your Start Menu, type %appdata% and press enter, and from there you'll be able to locate the minecraft folder in question.
3) This next step is important, so be sure to do this. Wherever you saved the Minecraft.exe file, COPY it, and PASTE it into the minecraft folder where your newly downloaded JAR is located: %appdata%-->Roaming-->.minecraft-->bin
4) (a)Ok, the Minecraft side of things is done. Now, let's screw around with Java. Make a shortcut to Minecraft.exe (on the desktop, start menu, wherever), and open the shortcut's properties (this can be done by right clicking and choosing properties, or, for you keyboard freaks, by holding ALT and double-left clicking the icon). Now, for the TARGET box you'll want to enter in this line of text EXACTLY as displayed below:
Remember, this help is mainly for those with Windows Vista 64, and if I'm not mistaken, the path above should be exact on your computer. If not, the only thing that will be different is the PROGRAM FILES aspect of the command line.
This may look similar to what you'll usually find posted on the net or at minecraft.net, but there are a couple of differences. For one, instead of the command line pointing to Minecraft.jar it points to Minecraft.exe. I'll let you figure out the rest.
(b)Now, for the START IN field you'll want to direct it to the location of both your JAR and EXE file. Mine is this:
C:\Users\Saratar\AppData\Roaming\.minecraft\bin
and yours will look something similar. For you VISTA users, if you ever need to know a directory path you can click the folder icon to the left of the folder names at the top of a Windows Explorer window. This will change it to a 'typed out' display of the folder you're currently viewing. Handy, and one of the few things Vista does right. The very few.
5) Sweet, you're almost done, and so far this has been nothing too different from what everyone else is babbling about on the net, except for one VERY IMPORTANT very INTRICATE very REQUIRED step. You'll need to download a 3rd party program called CFF Explorer (http://download.cnet.com/CFF-Explorer/3000-2383_4-10431156.html). I originally downloaded this program for Skyrim because it has one important capability that will solve all your java and memory issue woes: this program allows you to modify executables. Here, we're going to modify the JAVA and MINECRAFT executables to allow more RAM usage. Did you know that, by default, programs are prohibited from using more than 2gb of your system's memory? I don't get that. I might as well use my 6gigs o' DDR3 RAM as doorstops if that kind of crap is going to keep me from enjoying my beloved video games. Anyways, moving on...
6) Ok, so, CFF Explorer downloaded. Open the program and use it to OPEN the MINECRAFT.EXE file located in your %appdata% directory tree. Once open, click FILE HEADER, then, on the right side, click the CHARACTERISTIC'S grey box that says "Click Here." You'll notice a menu of checkbox options will open. Find the option that says "App can handle >2gb address space" and check that box. Hit ok. Save the file, and select YES when it asks to overwrite (did you backup the original file?).
7) Now, do the same for your JAVA.EXE file. I also edited my JAVAW.EXE, but I doubt it was necessary.
8) Congrats! All of the needed changes have been made to ensure that Minecraft is being allotted the necessary RAM to enjoy, crash free. Last but not least, you'll run MC from the shortcut you made earlier. Please be sure to right click the shortcut and choose RUN AS ADMINISTRATOR. Not sure if this really helps, but it's just a suggestion. Couldn't hurt, right?
So there. After a good 5+ hours of research, a thousand forum tabs, and an era of Minecraft crashing continuously, I no longer have memory or crash issues with MC. However, on a contradictory note, I HAVE noticed that if I stay in F1 view and take hella pictures (F2) that the game will eventually crash on me and report the same java memory issue crud, but if I'm just running around, punching trees and designing masterpieces then I see no crashes whatsoever.
So for you Vista 64 owners out there who are pulling your hair out for a solution in ONE PLACE, I present to you said above novella. Let me know if this works for you, and feel free to add anything you've found particularly helpful to keep Minecraft running like the beast she be.
Yeah, you overthought this. Install 64 bit java, you're using the 32 bit one. 2GB memory restriction for 32 bit programs is a system restriction because using a 32 bit number you can only reference 4GB of unique bytes. Some of the address space is reserved by the operating system, so you only get 2GB. Just because you can modify that doesn't mean it will behave predictably or safely. If it allocates memory outside of the 4GB threshold that it can modify, it still won't be able to modify it. It's probably not safe to let the program use the operating system's reserved space either.
Ok, so I started this post because of the frustration I'd had in trying to get Minecraft up and running, Java crash free. I'm going to tell you, first, the problem I was having with the game so you can determine if MY problem sounds like YOUR problem. Then, I'm going to lay out how I FIXED the problem specifically, as, from the massive amounts of research I did, I can tell that there are a lot of questions, but very few answers that worked. I'm sorry if this will be somewhat lengthy and lacking in bullet points, but I'll do my best to make the layout as quick-to-read as possible. btw, ignore all the videos online: they're a waste of your time.
So, first, the PROBLEM.
I've owned MC since ver 1.3 something. With the update that followed shortly after, my MC kept crashing after several minutes of play. This was more likely to happen the further out from zero spawn I was or the more screenshots I would take in one playthrough. In older versions, the game would just crash to desktop. Double-click MC icon, I'm back in the game for 5-10 minutes, !BOOM! crash.
With later versions MC was nice enough to tell me that I had java memory issues, but I was like "Memory issues?? wtf, I have 6gigs of DDR3 and a 1.75gig o' RAM BFG Nvidia card, running on a core i7." When the full release came out, 1.8, my game would crash every 30 seconds to 2 minutes. The solution to this was easy: clean wipe and reinstall of the game, but the memory issue continued to plague me, and still I crashed every 5-10 minutes. (Didn't stop me from building a masterpiece, but this was getting old). It was time for a solution.
So, the SOLUTION.
1) First of all, if you're frustrated beyond belief, I suggest you start with a fresh install of the most recent version of the MC EXE (http://www.minecraft.net/download). Download, put this first instance of the EXE wherever (don't listen to people's crap about it having to be on your desktop; that's just silly), and run it for the first time, so that, once logged in, the game has to download all the necessary files.
2) Next, you'll need to download the JAR file from the website. ***Please please PLEASE make backup copies of all original files. These files are not hard to retrieve if you screw up the original, but keeping a backup of original files is good practice. I generally make a new folder called ORIGINAL and toss a copy of the files I'm going to change in there.*** Just so no one's lost, go to (http://www.minecraft.net/download), click the SHOW ALL PLATFORMS link, and there you'll see the Minecraft.jar file. Save this file in your %appdata%-->Roaming-->.minecraft-->bin folder, and overwrite the original JAR file. If you can't find this folder, then click RUN in your Start Menu, type %appdata% and press enter, and from there you'll be able to locate the minecraft folder in question.
3) This next step is important, so be sure to do this. Wherever you saved the Minecraft.exe file, COPY it, and PASTE it into the minecraft folder where your newly downloaded JAR is located: %appdata%-->Roaming-->.minecraft-->bin
4) (a)Ok, the Minecraft side of things is done. Now, let's screw around with Java. Make a shortcut to Minecraft.exe (on the desktop, start menu, wherever), and open the shortcut's properties (this can be done by right clicking and choosing properties, or, for you keyboard freaks, by holding ALT and double-left clicking the icon). Now, for the TARGET box you'll want to enter in this line of text EXACTLY as displayed below:
"C:\Program Files (x86)\Java\jre6\bin\java.exe" -Xmx1024M -Xms1024M -cp minecraft.exe net.minecraft.LauncherFrame
This may look similar to what you'll usually find posted on the net or at minecraft.net, but there are a couple of differences. For one, instead of the command line pointing to Minecraft.jar it points to Minecraft.exe. I'll let you figure out the rest.
(b)Now, for the START IN field you'll want to direct it to the location of both your JAR and EXE file. Mine is this:
C:\Users\Saratar\AppData\Roaming\.minecraft\bin
and yours will look something similar. For you VISTA users, if you ever need to know a directory path you can click the folder icon to the left of the folder names at the top of a Windows Explorer window. This will change it to a 'typed out' display of the folder you're currently viewing. Handy, and one of the few things Vista does right. The very few.
5) Sweet, you're almost done, and so far this has been nothing too different from what everyone else is babbling about on the net, except for one VERY IMPORTANT very INTRICATE very REQUIRED step. You'll need to download a 3rd party program called CFF Explorer (http://download.cnet.com/CFF-Explorer/3000-2383_4-10431156.html). I originally downloaded this program for Skyrim because it has one important capability that will solve all your java and memory issue woes: this program allows you to modify executables. Here, we're going to modify the JAVA and MINECRAFT executables to allow more RAM usage. Did you know that, by default, programs are prohibited from using more than 2gb of your system's memory? I don't get that. I might as well use my 6gigs o' DDR3 RAM as doorstops if that kind of crap is going to keep me from enjoying my beloved video games. Anyways, moving on...
6) Ok, so, CFF Explorer downloaded. Open the program and use it to OPEN the MINECRAFT.EXE file located in your %appdata% directory tree. Once open, click FILE HEADER, then, on the right side, click the CHARACTERISTIC'S grey box that says "Click Here." You'll notice a menu of checkbox options will open. Find the option that says "App can handle >2gb address space" and check that box. Hit ok. Save the file, and select YES when it asks to overwrite (did you backup the original file?).
7) Now, do the same for your JAVA.EXE file. I also edited my JAVAW.EXE, but I doubt it was necessary.
8) Congrats! All of the needed changes have been made to ensure that Minecraft is being allotted the necessary RAM to enjoy, crash free. Last but not least, you'll run MC from the shortcut you made earlier. Please be sure to right click the shortcut and choose RUN AS ADMINISTRATOR. Not sure if this really helps, but it's just a suggestion. Couldn't hurt, right?
So there. After a good 5+ hours of research, a thousand forum tabs, and an era of Minecraft crashing continuously, I no longer have memory or crash issues with MC. However, on a contradictory note, I HAVE noticed that if I stay in F1 view and take hella pictures (F2) that the game will eventually crash on me and report the same java memory issue crud, but if I'm just running around, punching trees and designing masterpieces then I see no crashes whatsoever.
So for you Vista 64 owners out there who are pulling your hair out for a solution in ONE PLACE, I present to you said above novella. Let me know if this works for you, and feel free to add anything you've found particularly helpful to keep Minecraft running like the beast she be.
~Saratar
The Watchtower of Hope
Topcraftia
This is likely to eventually cause you some real problems.
To use more than 2G on a 64bit OS, the proper solution is to install 64bit Java.
And if you were playing vanilla MC and getting out of memory, the problem may be memory leaks in your video driver.
Yeah, you overthought this. Install 64 bit java, you're using the 32 bit one. 2GB memory restriction for 32 bit programs is a system restriction because using a 32 bit number you can only reference 4GB of unique bytes. Some of the address space is reserved by the operating system, so you only get 2GB. Just because you can modify that doesn't mean it will behave predictably or safely. If it allocates memory outside of the 4GB threshold that it can modify, it still won't be able to modify it. It's probably not safe to let the program use the operating system's reserved space either.
TL;DR just install 64 bit java
http://www.oracle.com/technetwork/java/javase/downloads/jre-6u31-download-1501637.html
(64 bit for windows is the last one in the list)
[FAQ] Extremely Common Problems
[OFFICIAL] Dragon Cave Thread