Moderator Note
This issue is caused either by Environment Variables (system or user), or is caused by 3rd party software. Currently it is known that Razer Synapse causes this issue.
To fix, uninstall Razer Synapse, delete the variable and restart.
-Open a admin command prompt
Windows 7:
To start a command prompt as an administrator
Click Start, click All Programs, and then click Accessories.
Right-click Command prompt, and then click Run as administrator.
Windows 10:
Press Win+X, select Command Prompt(Admin)
-type "rundll32 sysdm.cpl,EditEnvironmentVariables"
-Find "_JAVA_OPTIONS" and remove it
I noticed yesterday when playing with a bunch of mods, Minecraft is being launched with forced java options. The environment variable _JAVA_OPTIONS is being set for the process only with a value of -Xmx512M. Limiting java's ram to half a gigabyte. All the user specified fields of the amount of ram to allocate is being overwritten by the -Xmx512M flag being appended to the JVM args string. At first, I thought this was only local and some issue with my instance of Minecraft, but it isn't. Today, in #minecrafthelp on esper, one user was complaining that their Minecraft was running slow. Upon closer inspection, he too was also running with 512M of ram even though more has been specified.
However, when running minecraft from the command line by executing "java -jar Minecraft.exe", the _JAVA_OPTIONS environment variable is not set.
Here is a (forced) crash report of my instance of minecraft with the issue: http://pastebin.com/NmnKLA39
Here is a (forced) crash report of the esper's minecraft instance: http://pastebin.com/ACpFTTMn
If it matters, here are my environment variables currently set on my system: http://pastebin.com/jQzqAFZq
Screenshot of minecraft log showing _JAVA_OPTIONS being picked up: http://puu.sh/cWHVD/c6d7e79dd3.png
Related issues
is duplicated by
Comments


The issue with the other user was not related to your bug report, so any information from it is not useful at all, because their problem was not this _JAVA_OPTIONS

I can't find _JAVA_OPTIONS in it.

when i type rundll32 sysdm.cpl,EditEnvironmentVariables _Java_Options is not there
Doesn't look like a dupe to me. The issue I'm having is that java is being forced to 512M. No matter the JVM arguments, It's still going to allocate 512M of ram. In MC-28362, from what I see from it, this is something completely different than "Minecraft Running out of memory." If I am wrong, please explain to my how.