A good post discussing JVM cannot allocate memory (errno=12)

http://bryanmarty.com/2012/01/14/forking-jvm/

To enable over-commit temporarily:

echo 1 > /proc/sys/vm/overcommit_memory

For a more permeant solution, you will need to edit /etc/sysctl.conf and add the following:

vm.overcommit_memory = 1

Now just restart your system for the change to take effect.