Solution:
Well, the minimum requirement on a 32 bit PC for heap size is 1.5 GB and the maximum size is 1.8 GB according to IBM. That’s the reason your JVM is not initialized for -Xmx2G.
The possible solution, in this case, could be:
Go to Start
> Control Panel
> System
> Advanced system settings
> advanced(tab)
> Environment Variables
> System Variables
> New
:
Variable name: _JAVA_OPTIONS
Variable value: -Xmx512M
Boom. This should work now.