Java broken on minecraft?

CroogerAlex

Reputable
Dec 9, 2014
7
0
4,510
I have tried adding 2Gbs of RAM allocated to minecraft (I have 8Gbs on my PC) and no matter what I tried because I have tried doing a lot of things of the internet all day I am on Java 7 Update 67 Trying to run Pixelmon on forge 10.13.0.1180 sometimes it starts and allows me to only use ~500Mb so every 5 seconds I freeze and sometimes it comes up with error messages like; Error occurred during initialization of VM
Incompatible minimum and maximum heap sizes specified
Picked up _JAVA_OPTIONS: -Xmx512M

I have no idea whats happening please help :??:

PC Specs:
GeForce GT 620
8Gbs of RAM
i3-3220 3.30Ghz
^^^ I know it's a bad PC ^^^
 
The JVM has 2 arguments to define memory size. -Xms and -Xmx, respectively min and max.
You most likely added up memory only to the minimum argument, while you left the max one at default and eventually surpassed it.
This, depending on the installed JRE, can lead to unstable behaviour or crashes at startup.

Set BOTH -Xms and -Xmx arguments to the values you want, and make sure the former is a lower or equal value than the latter (with both staying under your total available memory, of course). It would be possible for you to set them both at the same value, although it's usually not recommended. For example, you can set the min value at 1/4 of the max value.
 


I tried putting them at the same value but I am still getting
"Error occurred during initialization of VM
Incompatible minimum and maximum heap sizes specified
Picked up _JAVA_OPTIONS: -Xmx512M"
when im using; "-Xms2048M -Xmx2048M" I also tried "-Xms512M -Xmx2048M" starts but only allows me to use ~500Mbs again.
 


Im using 64Bit and I only have 8Gbs of RAM and ~3Gbs are being using by other things so it's cutting it close
 
Those are just minimum and maximum values, it won't allocate as much unless you really need it. Even so, 7gb out of 8gb will still be ok (although I won't ask how in the world you already have 3gb occupied...)

I don't own minecraft, but for what I need it for, I know java well enough. Where are you writing those settings? I'm supposing there's a properties file or a configuration file somewhere.
Or are you setting that as an environment variable?
As a side note, do you actually require that underscore at the beginning? It feels...odd

You may also want to check you're actually using 64 bit java by opening a command prompt and typing "java -version" without quotes, although the safest way would be to look at where the JRE_HOME variable is pointing at.
 


http://imgur.com/I02UoxX and when i do java -version it says 64-bit
 
Well I'm lost. I use the Yogscast Complete Pack with ATLauncher often and just use -Xmx2048M -Xms4096M so yeah, not sure. Just to make sure, uninstall any 32bit versions of java if you have it and make sure the directory leads to the 64bit version.
 
I only see Xmn and Xmx arguments there, other than some tuning options (did you add them or were they already there?).
There's no -Xms argument...
It's not required, but it's usually good practice to add them both, unless you motivated why you only set max.

Plus, I think it's conflicting with environment variables or some hard-coded config values. By default, it should roughly use ~300mb, not 500. You will need admin rights to do the following.

Right click on "My Computer" and select "Properties", then select "Advanced System Properties" from the menu on the left.
On the window that pops up, there should be an "Environment Variables" button, click it.
If any of the two lists have a JAVA_OPTIONS line, take note of its value (for backup, you never know) and then delete it.
Reboot afterwards.

That should delete global launch variables and let applications specify their own needs correctly. If it still doesn't work, add the variable back in, in case some other application requires it.
 


There is no JAVA_OPTIONS in my environment variables and I also tried using -Xmx and -Xms before but I tried this because on other sites it said to try this
 
I'm at a loss too; something is definetly odd if you asked me, like if you/someone tweaked something and you/someone can't remember/tell.
I don't own Minecraft, so I don't know if it has some kind of configuration set somewhere.
Something's picking up that JAVA_OPTION argument somewhere and conflicting with what you're using to launch the game, that much I can tell, but that can't be anything else than an environment variable AFAIK...

Now you're saying that a lot of memory is being used, which would mean the game launched with the arguments you passed.
It shouldn't be this arbitrary...

Try Rukeith's advice and see if it works; make sure that you only have the latest Java 7 64-bit revision, and uninstall anything else related to Java but that.