Java Heap Space Bug?

Ok, so previously, ive increased the java heap space to 10G in advanced environmental settings, but this seems to crash the Arduino IDE software. I really need it to be 10G all the time.
is there a fix for this?

thanks!