Fixing this is a relatively simple task on Windows XP/Vista/7. You will need to know the directory for your Minecraft install, how much total RAM you have on your system, and how much you want to allow Minecraft to use. It is important to not allocate more RAM than you actually have, as this will cause errors.
To get started, open a basic text editing program such as Notepad. The first line of text you will want to enter looks like this: javaw -Xmx1536m -Xms512m -jar "C:\Users\(username)\Desktop\Games\Minecraft.exe". The -Xmx is the parameter, in megabytes, for the max amount of RAM Minecraft can access. Likewise, -Xms is the parameter for the minimum amount, also in megabytes. Included is my default filepath for Minecraft, on Windows 7, which you will want to replace with your file path. In my example, I have tripled the amount of RAM potentially available to Minecraft (1536m), but you can change this number to better suit your needs.
The next line of the file should read: “start Minecraft.exe”. This will change the parameters for RAM usage and boot up the game for you in one process, rather than having to do these chores separately. All told, my file looks like this:
javaw -Xmx1536m -Xms512m -jar "C:\Users\(username)\Desktop\Games\Minecraft.exe"
The final step is to save your text file as a .bat file. To do this in Notepad, simply go to File, Save As, and enter a file name. Change the file type from .txt to All File Types, and at the end of the file name, add “.bat”. This will save the file properly.