This looks like a configuration problem since the error happens at the start up. Your application will consume memory if this succeeds. Try setting a lower maximum memory, and if you are using a 32-bit OS you will not be able to use a 4G memory space. A 64-bit OS and 64-bit JDK combination might mitigate the problem.