If you get this error:
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Invalid maximum heap size: -Xmx4096M
The specified size exceeds the maximum representable size.
This means you're using 32-bit java. As of June 2018, the current 64-bit version for windows is Java 8 Update 171. Installing that version could fix the problem. Alternatively one person was able to fix it by restarting. ¯\_(ツ)_/¯