TransWikia.com

Can't Allocate More RAM to Minecraft

Arqade Asked by Mr. Wulf on April 11, 2021

I’ve checked all the other answers and I can’t seem to find one that fits my situation.
I’ll go ahead and list everything I’ve tried, that way we can cruise through the generic answers.

Heads Up: New PC. Downloaded Java 64x. Copy and Pasted old PC’s .minecraft folder. Same specs except for CPU and GPU. It is Modded.

Problem: Everytime I launch Minecraft without allocating any RAM it starts fine but with only 500MB of RAM allocated. I can’t add arguments or I get a “Java Virtual Machine” Error. Changing the Environment Variables doesn’t affect the 500MB of allocated RAM. If I just add the -Xmx1G etc… argument it launches with 500MB of RAM regardless, unless I add more than 4GB then it spits out the “Java Virtual Machine” error.

Things I’ve Tried

  • Installed Java 64x
  • Reinstalled Java 64x
  • Re-reinstalled Java 64x
  • Ensured I was using 64x Java and not 32x
  • Made changes to Environment Variables
  • Turned it off and back on again
  • Set specific arguments
  • Reinstalled Minecraft.
  • Re-reinstalled Minecraft.
  • Forced Minecraft to Update (with an error)
  • Googled fixes for several hours
  • Found nothing
  • Posted here and several other places.
  • Awaiting replies…

*Also, don’t know if this is important, but the Java website can’t verify my Java.

2 Answers

To those having similar issues in the future:

Typing cat /proc/meminfo into the command line will inform you how much RAM you have free on your computer. Oftentimes there's just a lack of memory, meaning you need to either close some programs or upgrade your RAM.

If you definitely have enough memory (at least 1GB more than you want to dedicate), then adding -d64 to the same place where you put -Xmx and -Xms will force Minecraft to use Java x64 rather than any Java x86 that somehow snuck onto your machine.

Furthermore, you can try adding the 64-bit java to your computer's PATH:

  1. Right click on My Computer/Computer (on win10 simply enter settings and search "system settings" then skip to step 4)
  2. Go to Properties
  3. Go to Advanced system settings (or just Advanced)
  4. Click Environment variables in the bottom right.
  5. Add the location of the folder that javaw.exe is in to the PATH by clicking Path then clicking "Edit", then clicking "New" and adding it there - ensure there is a semicolon (;) at the end, or it won't work. (Note: If the PATH variable doesn't exist among "User variables" click "New", and set the following: Variable name = PATH, Variable value = location of the folder javaw.exe is in (this is often Program Files).)

If the issue persists beyond that, you don't have 64-bit Java installed.

Answered by Corsaka on April 11, 2021

-Xmx is for the maximum heap space. It doesn't tell Java this is what should be started with, but is the maximum. -Xms is for the minimum, so what the JVM starts with. But really, what it starts with is a much smaller concern than the maximum.

That being said, if you observe that the issue comes when you go beyond 4GB RAM, that is a clear indicator that what you have is a 32-bit program. Whatever you did to ensure you use 64-bit Java can't have been right.

Answered by kutschkem on April 11, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP