I have a very old linux system and installed java and play framework. When I run java I get:
java -version
Error occurred during initialization of VM
Could n
After googling more around I found this discussion. The problem is, that my Linux System is running in an openvz container:
The reason why Java complains is because on start up, it sees that the machine has more than 2 GB of RAM, so it starts up in server mode, which tries to allocate all the memory, which then fails because it is inside a VPS.
I could fix the java startup problem by changing /usr/java/jdk1.6.0_26/jre/lib/i386/jvm.cfg from:
-client IF_SERVER_CLASS -server
-server KNOWN
-hotspot ALIASED_TO -client
-classic WARN
-native ERROR
-green ERROR
to:
#-client IF_SERVER_CLASS -server
-client KNOWN
-server KNOWN
-hotspot ALIASED_TO -client
-classic WARN
-native ERROR
-green ERROR
Now I can run any play command. Maybe this helps other people having similar problems related to container based virtualization.
BR, Rene