You have to use -Xmx1G if you have 2GB RAM. You should use 75% of the total RAM available on your PC.