-Xmx2g won't work on windows for a 32bit process, so lowered the values to -Xmx512M