facing some problem with java virtual machine initialization. when i am using root account i can properly work with java. but when i am a user account it returns following error
Set the JVM memory:
export _JAVA_OPTIONS=-Xmx512M
Make sure the physical available memory is more then VM defined min/max memory.
Just be careful. You will get this message if you try to enter a command that doesn't exist like this
/usr/bin/java -v
The problem got resolved when I edited the file /etc/bashrc
with same contents as in /etc/profiles
and in /etc/profiles.d/limits.sh
and did a re-login.
I had this issue today, and for me the problem was that I had allocated too much memory:
-Xmx1024M -XX:MaxPermSize=1024m
Once I reduced the PermGen space, everything worked fine:
-Xmx1024M -XX:MaxPermSize=512m
I know that doesn't look like much of a difference, but my machine only has 4GB of RAM, and apparently that was the straw that broke the camel's back. The Java VM was failing immediately upon every action because it was failing to allocate the memory.