Anyone who might have an error when running the generate button. You can try this
#3 Out of memory error:
-if you see a out of memory error, you either run a 32 bit Java version, or did not reserve high enough heap memory. You can edit the .bat files to start the generator with more memory (4 Gigabytes should be enough for a normal sized map, defined with the -Xmx4G parameter, increase it as needed)
on my Windows i found that i had 2 versions of Java installed. I fixed this by editing my environment variables and added/modifying the value "JAVA_HOME"
1) Windows Key + E then right click on "This PC" -> Properties
2) click on "Advance system settings"
3) click environment values
4) check under variables for a setting called "JAVA_HOME", if it exists edit the value and point it to the 64bit version mine was "C:\Program Files\Java\jre1.8.0_251"
If it doesn't exists then click New. Set the name to "JAVA_HOME" and the value to the path of your 64bit java installation.