Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

when running java -version I get this error:

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

This is avoidable by using -Xmx64m, so java -Xmx64m -version works fine. But how can I set the VM argument -Xmx64m globally everytime a program runs the JVM?

E.g. when trying to install Gerrit which makes use of the keytool, it will crash due to exceeded memory space and in this case I can't set the VM arguments "manually".

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.