Error -Could not create the Java virtual machine via unix file
<p>I have written a unix program with a sample code as follows :</p>

<pre><code>export PATH=/usr/java5/jre/bin:$PATH
export JAVA_HOME=/usr/java5/jre/bin
export MW_HOME=$UCM_HOME/Middleware

export CLASSPATH=$MW_HOME:$MW_HOME/eaton/


# Verify whether required variables are set
if [ -z "${JAVA_HOME}" ]; then
  printf "\n\nError: Set the following environment variables:\n\n"
  printf "JAVA_HOME            (Absolute path to jdk directory)\n\n"
  exit 1
fi

JAVACMD="${JAVA_HOME}/java"



LIB="${UCM_HOME}/generic/oracle.ucm.fa_genericclient_11.1.1.jar"

config_file="${UCM_HOME}/generic"


echo $config_file
echo "${config_file}/connection.properties"


# jrf-client.jar is a manifest jar with MANIFEST.MF Class-Path referencing required client libraries
CUSTOM_CLASSPATH=$MW_HOME/oracle_common/modules/oracle.jrf_11.1.1/jrf-client.jar

checkerror()
{
  RESULTCODE=$?
  if [ ${RESULTCODE} -ne 0 ];then
    exit 1
  fi
}

${JAVACMD} -Xms512m \
-classpath "${CLASSPATH}:${LIB}" \
-Ducm.prop.default="${config_file}/connection.properties" \
test.oracle.apps.tx.GenericToolUpload "${FILE_LOCATION}/${FILE_NAME}" "${ENTITY_LIST}"

checkerror
exit
</code></pre>

<p>When i am executing this program. It is going into error with-</p>

<pre><code>JVMJ9GC020E -Xms too large for heap
JVMJ9VM015W Initialization error for library j9gc23(2): Failed to initialize
Could not create the Java virtual machine.
</code></pre>

<p>user profile was set with 256M. I have increased to 512M </p>

<p>But I am still getting the same error.</p>

<p>I think it is erroring out in <code>${JAVACMD} -Xms512m \</code> . But do not know the solution.</p>