I wrote a small java application and also wrote a small linux script to execute this Java program under Linux server .
But when ever i am trying to run this linux script , i am getting this Error
Can’t start up: not enough memory
Could anybody please help me in how to resolve this ??
This is my Script
echo "Start time: " `date`
SERVER_HOME=$HOME/
export CLASSPATH=.:
export CLASSPATH=$CLASSPATH$SERVER_HOME/home/kiran/apiToplist/lib/*:
echo $CLASSPATH
java -cp $CLASSPATH -Xmx2G com.tata.samples.QuoteData
echo "End time: " `date`
Do you really need 2GB of memory for a small java application? The value -Xmx2G tells the jmv to reserve 2GB of memory for your application. If this is not available it will not work.
If 2GB is not needed, consider removing the value or lowering it.