I've seen some articles detailing how to launch Minecraft with more than the default 128-512 MB of RAM allocated to it to improve performance; doing this greatly improved the performance for me.
Noticing that it was tedious to determine how much memory I wanted to use for Minecraft and entering the appropriate command at the command line every time I wanted to launch Minecraft, as well as feeling that existing launchers with a RAM allocation feature seemed a bit involved for such a simple purpose as this, I decided to develop an application that would allow me to perform this process with minimal user input.
NOTE September 28, 2012:
Development here has effectively ground to a halt; as such, I've released the utility under the GPL. If anyone has ideas as to the cause of the problem, or can provide me detailed information about their computer, please let me know, either by replying to this thread or emailing me from my website.
As I said, this has worked fine for me in all of the testcases I've had a chance to put together, so if the utility is something in which you'd be interested, it's still definitely worth a try to use it on your system.
My primary system, on which this works perfectly and consistently, is a Core i5 build with 8GB RAM, Minecraft 1.3.2, 64-bit Windows 7, Java 7, and .NET Framework 6 (or whatever the one that was released in 2008 was). I have tried this on a Core i7 8GB laptop with roughly the same software, and it worked there as well. However, I haven't had a chance to try and get this running on any VMs or other PCs, so I am working with a very limited sample set.
Just in case I do get a chance to put some more time into this, again, please send me any information you can about your computer, your setup, and whether or not this works. Positive samples are still samples nonetheless.
NOTE August 22, 2012: Two Three people have reported an "unable to access jarfile" bug; I have tested this WFM with 1.3.2 on W7 x64. I will investigate this further in the near future.
Old news:
UPDATE July 4, 2012: v1.0 has been released!(Also v1.1.)
Everything is very different now.
Thanks to ChrisPerson for providing some of the code used in the detection of the Java location. Check out his RAM Expansion Tool over at PlanetMinecraft.
The interface is pretty intuitive, and I don't think it requires too much explanation here.
This has been tested on 64-bit Windows 7 with Minecraft 1.2.5 and 1.3.2. Further testing is planned.
Command-line options (added in v1.0) and shortcuts (fixed in v1.2):
A shortcut can be created on the desktop (this can be renamed or moved without breaking anything) to launch Minecraft with a certain amount of RAM.
For example, you can create a shortcut to launch Minecraft with 1GB of RAM.
The command-line switches are:
/rfnnn - start Minecraft with nnnbytes of RAM (1 MiB = 1048576 bytes)
/dnnn - launch the launcher, emulating nnn free bytes of RAM (for debugging purposes)
Installation: Should be compatible with Windows XP and above.
Extract the executable from the ZIP file, and place it in the same folder as your minecraft.exe.
Alternatively, place it in whatever folder you like, and place minecraft.exe in the root of your C: drive.
Rename it to whatever you like.
Renaming or moving the executable will break any shortcuts you have created with it.
Download: PLEASE READ NOTE ABOVE (September 28)
All versions can be downloaded from TortoiseWrath.com.
The most recent version is at the top.
Changelog:
v1.2 July 5, 2012
Fixed shortcut creation.
v1.1 July 4, 2012
Fixed typo.
Zipped executable to avoid false-positives by heuristic scanners.
v1.0 July 4, 2012
Rewrote program in VB.NET
Added GUI.
Granularized heap size options below 4 gibibytes available physical memory.
Added command-line switches.
Added shortcut creation feature.
Better Minecraft and Java location algorithm.
Fixed compatibility with Windows XP/Vista.
v0.1 June 22, 2012
Initial release.
Plans for future releases:
Add an "advanced view" allowing users to adjust heap size manually.
Allow users to allocate percentages of RAM to Minecraft and create shortcuts to these percentages.
Create a configuration file or registry entry, allowing users to locate their Minecraft and Java executables manually (if need be).
Use system paths so that it won't break on non-English versions of Windows.
Add localizations.
Add proper icons.
Add an installer.
Create a 'lite' version with less features to consume less disk space (because 70 KB is clearly too much)
Improve error handling.
Convert code to C# or C++ to improve the launcher's memory usage.
Improve appearance.
Create versions for any other platforms on which it is necessary, except OS X.
v0.1 information:
This is still in the very early stages of development, but it works well enough for me that I thought I should publish it in case anybody wants it.
The utility can be used by opening the file in Notepad, editing the location for the Minecraft executable on the second line (it defaults to C:\Minecraft.exe), and saving it to the location where you want the Minecraft icon.
Tested with Minecraft 1.2.5 on Windows 7 64-bit; as far as I know, it should work with all Minecraft versions on Windows XP+.
UPDATE 1 July 2012:
This has been tested with Minecraft 1.2.5; as far as I know, it should work with all versions of Minecraft.
This works fine on Windows 7 (though I've only tested it on 64-bit Windows 7, it should work with 32-bit as well).
To use this on Windows XP, the XP must be 32-bit and updated to SP3, and the KB968930 patch must be installed.
I haven't tested this on Vista yet; if the launcher flashes on the screen and does not ask for user input (as described by MicroGames18 below), Vista SP1 or SP2 and the aforementioned patch must be installed; the patch can be downloaded here (for 32-bit Vista) or here (for 64-bit Vista).
It will probably work in Windows 8 upon release; I'll do further testing to see how it behaves on Vista and W8.
Screenshots:
Screenshots of v1.x:
The launcher:
Shortcuts:
Debug switch:
Screenshots of v0.1:
Running fine on Windows 7:
Launching Minecraft with 5GB of RAM (launching with >4GB requires 64-bit Windows and Java):
Running on Windows XP after installing patch:
If you receive this error installing the patch on Windows XP, this update needs also be installed.
Hmmm I never had a problem before til I added a couple of mods and now I am lagging a bit in sections but mine shows 512mb for ram, I was curious where you can manually do this but a launcher might be nice for me, But I am a computer idiot and is there any damage to opening the throttle sort of speak to too much?
is there any damage to opening the throttle sort of speak to too much?
The worst-case scenario with this would be the launcher closing itself without starting Minecraft. If that happens, simply enter a smaller number when you next use the launcher or launch Minecraft without it.
My brother uses another launcher not minecraft exe. so it doesn't work properly because it's trying to raise the ram of Minecraft exe. not his launcher i was wondering if there was an easy fix or if you could walk me through how to make the same thing but for another program because if could be quite usefull for more things than minecraft.
My brother uses another launcher not minecraft exe. so it doesn't work properly because it's trying to raise the ram of Minecraft exe. not his launcher i was wondering if there was an easy fix or if you could walk me through how to make the same thing but for another program because if could be quite usefull for more things than minecraft.
This will only work with Java executables - .jar files and .jar files compiled into .exe files.
If you open the .cmd file in Notepad, you can change the path to the launcher on the second line. However, this is not likely to work with launchers, as it will only allocate RAM to the launcher, which will not be passed on by the launcher to Minecraft.
If he is launching the minecraft.jar file directly, it may work to set that path to the minecraft.jar file (I haven't tested this).
I agree that this could be quite useful for other Java applications; however, this launcher does not set the minimum RAM allocation in the manner that is expected my Java, because that doesn't work very well for Minecraft, but could cause other Java applications to eat all of your memory.
Doesn't work. It says "Error: Unable to access jarfile." I followed the instructions, and even tried the alternate.
I'll investigate this; it's likely a problem with 1.3, but if either of you could tell me what version of Windows and/or the JRE you're running, I could try it on there. At this time, I only have 64-bit Windows 7 readily available for testing.
Do you plan upon making this open source? I would love to make a Mac version, but need to see the code to get an idea of how to do it.
I am planning on releasing this under the GPL, but I doubt that doing so would be much help in porting it to OS X, as it's written in VB.NET. However, I had been working on creating a GTK-based version of this, which will probably be of use in creating a Mac version.
For the record: I will NEVER personally release, test, or support anything on Mac. Seriously.
I'm on Windows 7 w/32-bit, MineCraft 1.3.2 and I get "Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit." When I try to do the .bat file trick, and I get "Error: Unable to access jarfile" for the notepad cmd prompt
I'm on Windows 7 w/32-bit, MineCraft 1.3.2 and I get "Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit." When I try to do the .bat file trick, and I get "Error: Unable to access jarfile" for the notepad cmd prompt
Okay, I'll check some things in the next few days; don't expect anything to be released for at least a week, however - I have a small backlog of work at the moment, and need to get caught up with things that are sources of income.
Noticing that it was tedious to determine how much memory I wanted to use for Minecraft and entering the appropriate command at the command line every time I wanted to launch Minecraft, as well as feeling that existing launchers with a RAM allocation feature seemed a bit involved for such a simple purpose as this, I decided to develop an application that would allow me to perform this process with minimal user input.
NOTE September 28, 2012:
Development here has effectively ground to a halt; as such, I've released the utility under the GPL. If anyone has ideas as to the cause of the problem, or can provide me detailed information about their computer, please let me know, either by replying to this thread or emailing me from my website.
As I said, this has worked fine for me in all of the testcases I've had a chance to put together, so if the utility is something in which you'd be interested, it's still definitely worth a try to use it on your system.
My primary system, on which this works perfectly and consistently, is a Core i5 build with 8GB RAM, Minecraft 1.3.2, 64-bit Windows 7, Java 7, and .NET Framework 6 (or whatever the one that was released in 2008 was). I have tried this on a Core i7 8GB laptop with roughly the same software, and it worked there as well. However, I haven't had a chance to try and get this running on any VMs or other PCs, so I am working with a very limited sample set.
Just in case I do get a chance to put some more time into this, again, please send me any information you can about your computer, your setup, and whether or not this works. Positive samples are still samples nonetheless.
VB.NET 2008 source here.
NOTE August 22, 2012:
TwoThree people have reported an "unable to access jarfile" bug; I have tested this WFM with 1.3.2 on W7 x64. I will investigate this further in the near future.Old news:
UPDATE July 4, 2012:
v1.0 has been released! (Also v1.1.)
Everything is very different now.
Thanks to ChrisPerson for providing some of the code used in the detection of the Java location. Check out his RAM Expansion Tool over at PlanetMinecraft.
The interface is pretty intuitive, and I don't think it requires too much explanation here.
This has been tested on 64-bit Windows 7 with Minecraft 1.2.5 and 1.3.2. Further testing is planned.
Command-line options (added in v1.0) and shortcuts (fixed in v1.2):
A shortcut can be created on the desktop (this can be renamed or moved without breaking anything) to launch Minecraft with a certain amount of RAM.
For example, you can create a shortcut to launch Minecraft with 1GB of RAM.
The command-line switches are:
Installation:
Should be compatible with Windows XP and above.
Extract the executable from the ZIP file, and place it in the same folder as your minecraft.exe.
Alternatively, place it in whatever folder you like, and place minecraft.exe in the root of your C: drive.
Rename it to whatever you like.
Renaming or moving the executable will break any shortcuts you have created with it.
Download: PLEASE READ NOTE ABOVE (September 28)
All versions can be downloaded from TortoiseWrath.com.
The most recent version is at the top.
Changelog:
Plans for future releases:
v0.1 information:
This is still in the very early stages of development, but it works well enough for me that I thought I should publish it in case anybody wants it.
The utility can be used by opening the file in Notepad, editing the location for the Minecraft executable on the second line (it defaults to C:\Minecraft.exe), and saving it to the location where you want the Minecraft icon.
Tested with Minecraft 1.2.5 on Windows 7 64-bit; as far as I know, it should work with all Minecraft versions on Windows XP+.UPDATE 1 July 2012:
This has been tested with Minecraft 1.2.5; as far as I know, it should work with all versions of Minecraft.
This works fine on Windows 7 (though I've only tested it on 64-bit Windows 7, it should work with 32-bit as well).
To use this on Windows XP, the XP must be 32-bit and updated to SP3, and the KB968930 patch must be installed.
I haven't tested this on Vista yet; if the launcher flashes on the screen and does not ask for user input (as described by MicroGames18 below), Vista SP1 or SP2 and the aforementioned patch must be installed; the patch can be downloaded here (for 32-bit Vista) or here (for 64-bit Vista).
It will probably work in Windows 8 upon release; I'll do further testing to see how it behaves on Vista and W8.
Screenshots:
Screenshots of v1.x:
The launcher:
Shortcuts:
Debug switch:
Screenshots of v0.1:
Running fine on Windows 7:
Launching Minecraft with 5GB of RAM (launching with >4GB requires 64-bit Windows and Java):
Running on Windows XP after installing patch:
If you receive this error installing the patch on Windows XP, this update needs also be installed.
The worst-case scenario with this would be the launcher closing itself without starting Minecraft. If that happens, simply enter a smaller number when you next use the launcher or launch Minecraft without it.
Hmm, do you know what version of Windows you have?
The update for Windows XP can be found here. If you receive the below error message when installing the update, install this update and try again.
This makes the utility run correctly:
I'll work on trying to find a more intuitive and less time-consuming method by which to run the utility on older operating systems.
This will only work with Java executables - .jar files and .jar files compiled into .exe files.
If you open the .cmd file in Notepad, you can change the path to the launcher on the second line. However, this is not likely to work with launchers, as it will only allocate RAM to the launcher, which will not be passed on by the launcher to Minecraft.
If he is launching the minecraft.jar file directly, it may work to set that path to the minecraft.jar file (I haven't tested this).
I agree that this could be quite useful for other Java applications; however, this launcher does not set the minimum RAM allocation in the manner that is expected my Java, because that doesn't work very well for Minecraft, but could cause other Java applications to eat all of your memory.
I dabble in the arts of web development and minecraft modding.
I'll investigate this; it's likely a problem with 1.3, but if either of you could tell me what version of Windows and/or the JRE you're running, I could try it on there. At this time, I only have 64-bit Windows 7 readily available for testing.
I am planning on releasing this under the GPL, but I doubt that doing so would be much help in porting it to OS X, as it's written in VB.NET. However, I had been working on creating a GTK-based version of this, which will probably be of use in creating a Mac version.
For the record: I will NEVER personally release, test, or support anything on Mac. Seriously.
Okay, I'll check some things in the next few days; don't expect anything to be released for at least a week, however - I have a small backlog of work at the moment, and need to get caught up with things that are sources of income.