3

I created a program in the past using VB.net that launched Minecraft using the following parameters:

javaw.exe -Xmx2G -jar "C:\Users\DarkWolffe\Documents\Games\Minecraft\Minecraft.exe"

It was working for a long time, until just recently when a friend who also uses it noticed that his client was no longer launching with the desired amount of memory, and was instead defaulting back to having just under 1GB.

I use shaders, so memory is something I find myself having a lot of lust for. I've tried using the command-line parameters in this thread with no luck, I've tried an argument for garbage collection, nothing has worked.

I'm running Windows 8.1 Pro x64 with both 32- and 64-bit versions of Java installed for browsers and Minecraft, respectively.

  • That command looks wrong, you should be using javaw to launch minecraft.jar, not Minecraft.exe (which is just the launcher). – fredley Mar 5 '14 at 9:10
  • That never mattered in the past, but I'm willing to give it a shot. – Cora Mar 5 '14 at 9:10
  • I tried the *.jar executable with all the command line types and none worked. – Cora Mar 5 '14 at 9:15
  • the executable is just a launcher that will launch another jvm which gets the default arguments. you'd need to launch the actual jar in the .minecraft folder (with correct classpath and all) – ratchet freak Mar 5 '14 at 10:02
  • Tried that, didn't work. – Cora Mar 10 '14 at 22:05
8

That command actually starts the Launcher with 2G. To set the memory for the game itself, Click on 'Edit Profile' in the launcher:

edit profile

Then check 'JVM Arguments' and enter the memory parameter there:

jvm arguments

| improve this answer | |
  • Also, I'm not very familiar with shader mods but I have the feeling that increasing the JVM memory won't really help them - the bulk of the actual work is probably done by native code that uses the video card memory or the system memory directly (not through JVM). – Kcats Mar 5 '14 at 9:58
  • For some reason, while this has never worked for me in the past and resulted in my creating a secondary program, it's working now. For whatever the reason. Thank you for reminding me to try this. – Cora Mar 10 '14 at 22:08
1

Something else as well in addition to @Kcats post, make sure you have 64bit Java as I've seen that it won't allow you to allocate more than 1GB with 32Bit

| improve this answer | |
  • 1
    I can confirm that 64-bit Java is installed, per my original post. – Cora Mar 10 '14 at 22:05
0

I know that this is late, but if it helps then cheers.

I've had this issue since I started my server, no matter what I did I couldn't add more than 1024mb. After hours of searching I checked the java install itself. It was running on an x86 architecture, which won't allow more than one gig.

Uninstall that version of java fully, then download a x64 bit browser (I used Firefox) and then download java through that browser. Then you should be able to go into your .bat file and modify it accordingly to your systems potential.

| improve this answer | |
  • You do not need a 64bit browser for that. You can also choose your version manually on Java.com instead of just using the prompted one. On the bottom of the download page is a link See all Java downloads that leads you to the list. – dly Dec 9 '19 at 7:23
-1

Make sure, if you're using a x64 operating system that your java executable option is set to use x64 java, and not x86 java.

It should say C:\Program Files\Java\jre7\bin\java.exe Instead of something like C:\Program Files(x86)\Java\jre7\bin\java.exe . Notice how the Program Files are different. One is x64, one is x86. The x86 is for 32 bit computers. The x64 is for 64 bit computers. If your executable is pointing to 32 bit java, then it will not allow nore that 1G of ram.

To find out what you need to enter, first confirm you are using a 64 bit computer.

Next, go to Computer > Local Disc(C:) > Program Files (NOT x86!!) > Java > (Select the latest java 64x you've installed, mine is jre7) > bin > java.exe If you do not see any x64 java versions installed, install them. Google search "Java x64" and select a x64 java install made for your pc. If you're using windows, download the .exe version. I don't know about any of the other systems, my family mainly uses windows computers.

To confirm that you have that installed version of java working, do these steps:

Click Start on the task bar.
Select Control Panel (or Settings > Control Panel) from the Start menu. ...
Select Java. ...
Click the Java tab.
In the Java Application Runtime Setting box, click View.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.