Page 1 of 1

Running Minecraft with more RAM [Stop Out of Memory Errors]

Posted: Thu Nov 03, 2011 7:25 pm
by Shadowofrsr
This is for 64-Bit systems only.

What I did to up the ram usage was I downloaded a 64 bit Java client through internet explorer 64bit. Then downloaded a fresh minecraft.jar and put it in a new folder then create a shortcut and pick the start location as your fresh Minecraft.jar then once I made the shortcut I changed the target to this
Code: Select All Code
"C:\Program Files\Java\jre6\bin\java.exe" -Xmx4096M -Xms512M -cp Minecraft.jar net.minecraft.LauncherFrame

the -Xmx4096M is the number you change mine is set for 4GB of Ram since I have 8GB. If you give it about 3GB you should never have a problem. Never give more than 60% of your ram.



For a 32-bit system

Create a new shortcut and use the same method but you dont need to download a new java. Get the fresh jar and create a shortcut then have it start at that jar then make the target
Code: Select All Code
"C:\Program Files\Java\jre6\bin\java.exe" -Xmx2048M -Xms512M -cp Minecraft.jar net.minecraft.LauncherFrame


Dont give it more than 2048M which is 2GB and dont give it more than 60% of your ram.

---------------------------------------------------------------------------------------------------------------------------------
Another method as mentioned by HovR. In order to assign more than 2GB of ram you would still need the 64-bit Java if I am correct though.

HovR Wrote:Yep - The contents of the batch file should be as such:
Code: Select All Code
"C:\Program Files\Java\jre6\bin\javaw.exe" -Xms512M -Xmx2048M -jar "[Location of your Minecraft.exe]"

Type that code into notepad and save it as Start.bat and run it.



Adjust the 512 and 2048 as appropriate for your system architecture.

Re: Running Minecraft with more RAM [Stop Out of Memory Erro

Posted: Mon Nov 07, 2011 4:43 pm
by zerg960
Useful tip: Using javaw.exe instead of java.exe makes the console window that pops up go away. :>

Re: Running Minecraft with more RAM [Stop Out of Memory Erro

Posted: Sun Jan 08, 2012 10:24 am
by harshlife
Could anyone perhaps expand on this and make it a little bit more stepwise?

Re: Running Minecraft with more RAM [Stop Out of Memory Erro

Posted: Mon Jan 09, 2012 1:56 am
by SirDukem
Create new text document

Paste this into it:
"C:\Program Files\Java\jre6\bin\javaw.exe" -Xms512M -Xmx8092M -jar "C:\Users\Shane\Downloads\Minecraft.exe"


"C:\Program Files\Java\jre6\bin\javaw.exe" -Xms512M -Xmx8092M -jar "C:\Users\Shane\Downloads\Minecraft.exe"

Edit the location of your java executable file

Edit the minimum and maximum MB of RAM to use
-Tip: Do NOT use more than 1/2 of your system's RAM for your maximum. For example, My system has 16gb of RAM, so I used 8GB max

Edit the location of your minecraft executable file



Now, save the file as a batch file, for example, I named mine minecraft.bat
The only important part here is to add the .bat at the end. Now use this batch file you've just created to open minecraft!

Re: Running Minecraft with more RAM [Stop Out of Memory Erro

Posted: Sat Jun 09, 2012 6:15 am
by demalition90
PROTIP: minecraft only needs 256mb to run so if u limit it to 256 it will actually go abit faster and will allow you to use other programs alongside minecraft (i used to have to close minecraft to get on TeamSpeak/check dyn map or even open pinball... but now i can youtube and TS and google at same time