OBSOLETE AS OF 1.6.2
read description for more info and FAQ:
a simple fix to the error that crops up in Minecraft where it has run out of memory, typically during TNT explosions, using large mods or HD textures, and flying in creative. it also makes large TNT explosions which would not quite crash Minecraft much less laggy, and also prevents chunks from having to be re-rendered.
THIS WILL REDUCE YOUR FRAMERATE WHATEVER ANY OTHER SIMILAR VIDEOS MAY SAY if you play for long periods without reloading the map. there is no avoiding that because of a memory dumping error associated with allocating too much RAM. for this reason, i cannot recommend you use this unless you have to.
Code to copy-paste
Windows 7(64bit), Windows Vista(64bit) only:
start javaw -Xmx6144m -Xms6144m -Djava.library.path=".\bin\natives" -classpath "bin\minecraft.jar;bin\jinput.jar;bin\lwjgl.jar;bin\lwjgl_util.jar" net.minecraft.client.Minecraft
All other windows versions, and if the above doesn't work:
"C:\Program Files\Java\jre6\bin\javaw.exe" -Xmx2048M -Xms2048M -jar "C:\Users\*username*\desktop\minecraft.exe"
(replace *username* with your PC username and make sure the filepath is right to the exe)
Q: Its lagging a lot
A: reduce the allocated RAM by half. if it still lags, make the number preceeded by Xms half the number preceeded by Xmx for example: -Xmx2048m -Xms1024m. If it is still lagging, install the mod OptiFine
Q: I get blackscreen, then error report/it still runs out of memory
A: If you have any RAM not allocated, double the number preceeded by Xmx in the batch file. If not, half the number preceeded by Xms. If you still get blackscreen, reduce the render distance and stop blowing up so much TNT
Q: I cant log in to Minecraft.net
A: This is effectively a simplified minecraft launcher. The launcher usually logs in to minecraft.net, and so usually people have difficulty playing online with this. The fix is surprisingly simple: at the end of the code, type your username, leave a space, then type your password. You will then automatically log in to minecraft.net on opening the file
Q: It says 'Invalid or corrupt Jar file'
A: There are many errors which could cause this, one of the more likely is that you are not administrator on the computer. To make this work you have to be an admin. this often pops up because the batch file is not launching JVM properly to run the jar in
Q: I get 'Javaw was not found'
A: use the other code
Q: javaw is still not found
A: install the latest 64-bit java, and use the first code
Q: How do I find out how much RAM I have installed/which version of Windows I have?
A: Start Menu--Computer--System Properties
Q: what do I do if i only have a small amount of memory installed ie 1gb or less?
A: buy and install more. its dirt cheap. seriously. 1gb costs about £10 ($15) Check with your manufacturer with which type to buy/how to install/whether your computer has any more room etc.
Q: How do I change the icon to the standard Minecraft icon
A: Make a SHORTCUT to the batch file on the desktop. Rightclick on the shortcut, go to properties, change icon, browse for file, and select the minecraft application, then apply. rename the shortcut and voila
Q: Does it work with Technic?
A: Technic has an option to change allocated memory in its launcher meaning this fix is not needed
If your question is not answered here or in the comments, feel free to post it in the comments. I will endeavour to answer quickly, but I will not respond to ' HEEEEEELPPPP!!!!! IT WONT WOOOORK!!!' etc.