How to allocate more memory for Minecraft:
Because many people ask this question here's a little tutorial how to give Minecraft more RAM memory to work.
Why should I allocate more memory?:
Normaly Minecraft works fine with his 1GB RAM. But if you allocatte more memory, you can better some situations:
More RAM for texture pack buffering (128x ++)
More RAM for singleplayer and multiplayer maps buffering (less reloading)
Better working with RAM intensive mods
Faster map rebuild
First notice:
This tutorial requires that you've installed a full Java version, (Java SE) or Java Developement Kit (JDK, includes SE) on your system. Else it might not work right. Installing the right Java version (also important: 32/64 bit) often solves many problems.
"Minecraft runs out of memory" happens often while running it with the wrong Java version! The preinstalled Java on new Computers-Systems might not support this. If you don't have installed Java, get it here!
What do I have to do:
NEW launcher:
Since Minecraft version 1.6.X you can use the new launcher. With this, it is possible to integrate Java commands directly into the game. Here is what you have to do:
Download and execute the new launcher
In the section "Profile Selection" click on "Edit Profile"
Under "Java Settings (Advanced), activate "JVM Arguments" and add into the text area this argument:
-Xmx2048M -Xms2048M
Save this profile and execute Minecraft. You will always start with 2GB of RAM
Need more ram? You can adapt the number to your needings (see RAM Versions)
Picture depending on the launcher version. It may look little different with a newer launcher
OLD launcher:
Attention: This does not work with the new Minecraft Launcher, see above.
Go to the same folder where you downloaded and execute minecraft.exe (the launcher, not the jar file!)
Create a new textfile in this folder
In the textfile, you should write the following line:
2GB ram:
java -Xmx2048M -Xms2048M -jar "Minecraft.exe"
4GB ram:
java -Xmx4096M -Xms4096M -jar "Minecraft.exe"
Notice: If you use an older Java version or 32bit, Java might not support more RAM than 4GB. This depends on your system. Be sure to use the right and newest Java version (64bit on 64bit-systems is recommended). (thanks to everyone in this topic who told me this hint)
4. Save the file with a name you wish, but it is important that you save it as .bat (You need to see the endings of files to edit this correctly!). For example Minecraft 2GB RAM.bat
Notice: If you don't save the batchfile in the same folder where Minecraft.exe is, you have to type the whole path instead of the "Minecraft.exe"!
5. Now run your batch file (not the normal launcher) and minecraft starts with more memory. Finally, enjoy
Which numbers can I insert?:
You can adapt the numbers to your needings:
-Xmx is the maximum of RAM wich Minecraft can allocate.
-Xms is the allocated RAM at the beginning.
-Xms must not be greater than -Xmx!
Java 32bit only supports up to 4GB. The limit depends on the system, if you got an error, try less allocation.
Be sure to use the right and newest Java version (64bit on 64bit-systems is recommended).
1GB total allocated
-Xmx1024M -Xms1024M
2GB
-Xmx2048M -Xms2048M
3GB
-Xmx3072M -Xms3072M
4GB
-Xmx4096M -Xms4096M
5GB
-Xmx5120M -Xms5120M
6GB
-Xmx6144M -Xms6144M
8GB
-Xmx8192M -Xms8192M
and so on ...
You can also shorten:
-Xmx4G -Xms4G
Notice: You can't give Minecraft more Ram than you have! Else you will recieve an Error!
How much space can I allocate?:
At least not more than you've installed in your system.
To see how much RAM is free, open the Task Manager and change to the Performance Tab. Look how much Physical Memory is available / free.
Note that other programs and your system also need RAM to work:
Some numbers for example:
Windows Vista Home Basic: 512 MB RAM
Windows Vista Home Premium, Business, Enterprise, Ultimate: 1GB RAM
Windows 7: 1 GB RAM (32-Bit) or 2 GB RAM (64-Bit)
Windows 8 / 8.1: 1 GB RAM (32-Bit) or 2 GB RAM (64-Bit)
Linux: 1-2 GB
Skype: 256 MB
Teamspeak: 64 MB
Firefox: 512MB
Something doesn't work? Possible solutions: First of all check your batch file on spelling mistakes. This is one of the most frequently faults.
Then be sure you've installed a full Java version! Pre-installed versions might not support more memory.
Error "Could not create Java virtual machine":
Remove -Xms[RAM] and try again
Adjust the numbers, try both at the same level
Check if you've enough free RAM. Do you use 64bit (when greater than 4GB)?
Possible Solutions for old launcher:
CMD closes so fast, I can't read what's wrong:
Throw in pause on a new line (thanks to Syfaro for the hint)
System has a problem with the java:
Do you have installed Java SDK and the right version? (32/64bit on 32/64bit systems)
Could not reserve enough space for object heap
Could not create the Java cirutal machine.
Well. You don't have as much ram free as you wanted to allocate.
For example: You've a system with 4GB Ram. Windows 7 needs up to 2GB for itself. Check out the chapter above.
Batchfile doesn't work correctly:
First try the solutions at the top.
Sometimes enabelintthe incremental garbage collector can solve the problem (I don't know why but sometimes it works ):
There are 2 possible problems i thing could make this problem:
1. CMD can't find Minecraft.exe and stops running. You might try to give the whole path.
2. CMD may stop because of administration mode.
There are 2 possible problems i thing could make this problem:
1. CMD can't find Minecraft.exe and stops running. You might try to give the whole path.
Thanks this worked. I changed the bat back to a txt, changed 'minecraft.exe' to full path name 'c:/....minecraft.exe' and it has incresed the ram in game.
Doesn't seem to work for me. Here's exactly what I put: java -Xmx2048M -Xms2048M -jar "C:\Users\^^^^^\Desktop\Minecraft.exe" (erased my name) I do have the required RAM, but it just flickers the cmd screen, then nothing happens. Sorry if I'm missing something totally obvious, bit of a noob with this kind of stuff.
I've tried about 10 other variations, but I'll try it once more I guess.Same thing. Might be something with my computer, it's pretty new, and I'm sure there's nothing wrong with the actual .bat file.
The difficult thing is: before cmd closes, he writes his problem, but then it closes a bit too fast .
If we knew what cmd wants to tell us, it would be easier to help. The only think I could tell now is the same like Animal: Be sure the path is spelled right and you have the Minecraft.exe file on your deskop (not a minecraft.ink link).
Try to look if you can capture a picture or something of the cmd. If you find "Error: Unable to acess jarfile Minecraft.exe" then the problem is that cmd doesn't find the file.
Throw in pause on a new line, that way it will only close after you hit enter.
Thanks! The cmd said that java is not recognized as an internal or external command, operable program or batch file. I might try to update java, although I literally just got the newest pdate.
Thanks this worked. I changed the bat back to a txt, changed 'minecraft.exe' to full path name 'c:/....minecraft.exe' and it has incresed the ram in game.
Alright, I have come to the conclusion that is does not work. Minecraft seems to be running okay, and I'll be getting more RAM soon. Thanks for all the help, and I might PM you if I really need t.
Because many people ask this question here's a little tutorial how to give Minecraft more RAM memory to work.
Why should I allocate more memory?:
Normaly Minecraft works fine with his 1GB RAM. But if you allocatte more memory, you can better some situations:
- More RAM for texture pack buffering (128x ++)
- More RAM for singleplayer and multiplayer maps buffering (less reloading)
- Better working with RAM intensive mods
- Faster map rebuild
First notice:This tutorial requires that you've installed a full Java version, (Java SE) or Java Developement Kit (JDK, includes SE) on your system. Else it might not work right. Installing the right Java version (also important: 32/64 bit) often solves many problems.
"Minecraft runs out of memory" happens often while running it with the wrong Java version! The preinstalled Java on new Computers-Systems might not support this.
If you don't have installed Java, get it here!
What do I have to do:
NEW launcher:
Since Minecraft version 1.6.X you can use the new launcher. With this, it is possible to integrate Java commands directly into the game. Here is what you have to do:
- Download and execute the new launcher
- In the section "Profile Selection" click on "Edit Profile"
- Under "Java Settings (Advanced), activate "JVM Arguments" and add into the text area this argument:
- Save this profile and execute Minecraft. You will always start with 2GB of RAM
Need more ram? You can adapt the number to your needings (see RAM Versions)Picture depending on the launcher version. It may look little different with a newer launcher
OLD launcher:
- Go to the same folder where you downloaded and execute minecraft.exe (the launcher, not the jar file!)
- Create a new textfile in this folder
- In the textfile, you should write the following line:
2GB ram:4GB ram:
Notice: If you use an older Java version or 32bit, Java might not support more RAM than 4GB. This depends on your system. Be sure to use the right and newest Java version (64bit on 64bit-systems is recommended).
(thanks to everyone in this topic who told me this hint)
4. Save the file with a name you wish, but it is important that you save it as .bat (You need to see the endings of files to edit this correctly!). For example Minecraft 2GB RAM.bat
Notice: If you don't save the batchfile in the same folder where Minecraft.exe is, you have to type the whole path instead of the "Minecraft.exe"!
5. Now run your batch file (not the normal launcher) and minecraft starts with more memory. Finally, enjoy
Which numbers can I insert?:
- -Xmx is the maximum of RAM wich Minecraft can allocate.
- -Xms is the allocated RAM at the beginning.
- -Xms must not be greater than -Xmx!
Java 32bit only supports up to 4GB. The limit depends on the system, if you got an error, try less allocation.Be sure to use the right and newest Java version (64bit on 64bit-systems is recommended).
1GB total allocated
2GB
3GB
4GB
5GB
6GB
8GB
and so on ...
You can also shorten:
Notice: You can't give Minecraft more Ram than you have! Else you will recieve an Error!
How much space can I allocate?:
To see how much RAM is free, open the Task Manager and change to the Performance Tab. Look how much Physical Memory is available / free.
Note that other programs and your system also need RAM to work:
Some numbers for example:
Something doesn't work? Possible solutions:
First of all check your batch file on spelling mistakes. This is one of the most frequently faults.
Then be sure you've installed a full Java version! Pre-installed versions might not support more memory.
Error "Could not create Java virtual machine":
- Remove -Xms[RAM] and try again
- Adjust the numbers, try both at the same level
- Check if you've enough free RAM. Do you use 64bit (when greater than 4GB)?
Possible Solutions for old launcher:Throw in pause on a new line (thanks to Syfaro for the hint)
System has a problem with the java:
Do you have installed Java SDK and the right version? (32/64bit on 32/64bit systems)
May try to start java on another way:
If you know where you've installed Java, you can also try to start it from there:
System cannot find Minecraft.exe:
Give the whole path instead of "Minecraft.exe". Regard to spelling mistakes!
Not enouth memory:
You got this message? :
Well. You don't have as much ram free as you wanted to allocate.
For example: You've a system with 4GB Ram. Windows 7 needs up to 2GB for itself. Check out the chapter above.
Batchfile doesn't work correctly:
First try the solutions at the top.
Sometimes enabelintthe incremental garbage collector can solve the problem (I don't know why but sometimes it works
(thanks to xenalite for the hint)
You found a fault in the post? Something is missing? Tell it to me!
Please post questions and suggestions in this topic and not via PM!
P.S. Thank you for the positive reputations.
running windows 7 and the minecraft.exe file is in the same folder and called the same. any help?
I am having the same exact issue. It worked fine yesterday, and stopped working today.
1. CMD can't find Minecraft.exe and stops running. You might try to give the whole path.
2. CMD may stop because of administration mode.
Thanks this worked. I changed the bat back to a txt, changed 'minecraft.exe' to full path name 'c:/....minecraft.exe' and it has incresed the ram in game.
java -Xmx3072M -Xms3072M -jar "C:\Users\Russ\Desktop\Minecraft\Minecraft.exe"
(3gig) Mine is in a folder on my desktop and it is the actual application not a shortcut, just check the file, file path spelling
If we knew what cmd wants to tell us, it would be easier to help. The only think I could tell now is the same like Animal: Be sure the path is spelled right and you have the Minecraft.exe file on your deskop (not a minecraft.ink link).
Try to look if you can capture a picture or something of the cmd. If you find "Error: Unable to acess jarfile Minecraft.exe" then the problem is that cmd doesn't find the file.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffYou have annother version of Java than the most other people. For example a 32bit version installed.
Possible Solution:
Install this:
http://www.oracle.co...oad-432154.html
(You said you have a new computer, I think you should download the 64bit version)
There could also be annother reason, but I think what you need is this link
I hope this would help.
If you download and install java sdk 64bit, then you use 64bit java from now on. I think now also the batch file should work.