# // THIS PRODUCT CONTAINS RESTRICTED MATERIALS OF IBM
# // 5724-I63, 5724-H88, 5655-N01, 5733-W61 (C) COPYRIGHT International Business Machines Corp., 1997,2006
# // All Rights Reserved * Licensed Materials - Property of IBM
# // US Government Users Restricted Rights - Use, duplication or disclosure
# // restricted by GSA ADP Schedule Contract with IBM Corp.
#
# //  DESCRIPTION:
# //  
setWASHome()
{
    CUR_DIR=`pwd`
    WAS_DIR=`dirname ${0}`/..
    cd ${WAS_DIR}
    WAS_HOME=`pwd`
    cd ${CUR_DIR}
    HOST=`hostname`
    NODE=`uname -n`
    CELL=${NODE}
}

setWASHome

QWAS_OS_VERSION=${QSH_VERSION}
  
if [ "${QWAS_OS_VERSION:0:2}" = "V5" ] ; then
    JAVA_HOME=/QIBM/ProdData/Java400/jdk15
elif [ "${QWAS_OS_VERSION:0:2}" = "V6" ] ; then     
    JAVA_HOME=/QIBM/ProdData/Java400/jdk15    
else # V7R1M0 or later does not support the classic jvm 
    JAVA_HOME=/QOpenSys/QIBM/ProdData/JavaVM/jdk50/32bit              
fi

if [ -d ${JAVA_HOME} ]; then
	# check for the existence of JDK1.5	
else
	# JDK1.5 does not exist
	print "Can not locate dir: $[JAVA_HOME}."
	exit 1
fi


java \
-Djava.endorsed.dirs=${WAS_HOME}/java/endorsed \
-Djava.ext.dirs=${WAS_HOME}/classes:${WAS_HOME}/plugins:${WAS_HOME}/lib \
-Djava.version=1.5 \
-DWS_CMT_NODE_NAME=${NODE} \
-DWS_CMT_CELL_NAME=${CELL} \
-DWS_CMT_HOST_NAME=${HOST} \
-DWS_CMT_LOG_HOME=${WAS_HOME}/logs/cmt \
-DWS_CMT_LOG_NAME=installconfig.log \
-DWS_CMT_LOGLEVEL=3 \
-DWAS_HOME=${WAS_HOME} \
-Dwas.install.root=${WAS_HOME} \
-DWS_CMT_CONF_DIR=${WAS_HOME}/properties/version/nif/config/install \
com.ibm.ws.install.configmanager.launcher.Launcher "$@"