#!/usr/bin/qsh
# // 5639-D57, 5630-A36, 5630-A37, 5724-D18 (C) COPYRIGHT International Business Machines Corp. 1997, 2008
# // The source code for this program is not published or otherwise divested
# // of its trade secrets, irrespective of what has been deposited with the
# // U.S. Copyright Office.
#
#############################################################################################
# This script is inovked by the configuration manager during the
# config action phase of the ND fix pack install.
# The purpose of the script is to fix any bad JAVA_HOME variables in variables.xml. 
#
# Usage: fixJavaHome
#  
#############################################################################################

. $(/usr/bin/dirname $0)/setupCmdLine

CLASS_PATH="$WAS_CLASSPATH":"WAS_EXT_DIRS":"$WAS_INSTALL_ROOT"/plugins/com.ibm.ws.runtime.os400_6.1.0.jar:"$WAS_INSTALL_ROOT"/plugins/com.ibm.ws.runtime_6.1.0.jar:"$WAS_INSTALL_ROOT"/plugins/com.ibm.ws.emf_2.1.0.jar:"$WAS_INSTALL_ROOT"/plugins/org.eclipse.emf.ecore_2.2.1.v200609210005.jar:"$WAS_INSTALL_ROOT"/plugins/org.eclipse.emf.common_2.2.1.v200609210005.jar

java \
${JAVA_VERSION} \
-cp ${CLASS_PATH} \
-Dwas.install.root=${WAS_INSTALL_ROOT} \
-Dwas.install.library=${WAS_LIB} \
com.ibm.ws.os400.tools.ClientJavaHome
