This is using windows 7, but should help for windows 8. I'm not finding a guide for windows 8 sorry. All I find are files and references to windows with no version number or windows 7.
Right click on My Computer, or Computer if you use the start menu. Choose Properties. Choose Advanced system settings. Enter an admin password and click yes.This should open the System Properties in the Advanced tab, if not select it. Now choose Environmental Variables... In the second scroll box find JAVA_OPTS choose it and click on the Edit... button. Now remove any reference to -xmx namely -xmx512. You probably should remove it all though.
Edit: I believe if you run as an admin you should be able to change the variables the first way in the Java tab. Clicking on the view button, but I would need to log off and on again using an admin account to try it.
Mod note: I apologize for the double post if there is any, but I wanted to make sure that Kaitsau knew, was alerted, that I updated with the new instructions. Thanks.