My VPS Configuration
OS: centos-5-x86_64
VPS Platform: OpenVZ
HDD : 50 GB
Ram : 1 GB
I am trying to install software on my VPS, but Java is giving me some problems:
[property] java.io.IOException: Cannot run program “/bin/env”: java.io.IOException: error=12, Cannot allocate memory
So then I am tried to allocate heap memory to JVM by using the command:
$ java -Xms128m -Xmx128m DoRunTime
It will give such type of error
Exception in thread “DoRunTime” java.lang.NoClassDefFoundError: DoRunTime
Caused by: java.lang.ClassNotFoundException: DoRunTime
I have set my path as follows,
JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64
PATH=$PATH:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/bin
I have also tried running a simple Java program, and it's working properly.
I think the problem is in JVM heap memory.
Is there any need to create a partition?
Running:
$ free -m
yields
total used free shared buffers cached
Mem: 1024 23 1000 0 0 0
-/+ buffers/cache: 23 1000
Swap: 0 0 0