#!/bin/ksh
ESCUR_DIR=`pwd`
if [[ -z "$JAVA_HOME" ]]
then
	echo "JAVA_HOME not set"
elif [[ ! -d "$JAVA_HOME" ]]
then
	echo JAVA_HOME does not exist
	exit
fi
echo JAVA_HOME = $JAVA_HOME
export OLDPATH=$PATH
if [[ $PATH != *$JAVA_HOME/bin* ]] 
then
	export PATH=$JAVA_HOME/bin:$PATH
fi
echo $PATH
echo "$JAVA_HOME/bin/java" -cp ./../../lib/BaseInstaller.jar:./../../lib/WinRegistry.jar -splash:./../../resources/Setup.jpg com.infor.install.MainProgram $1 $2 $3 $4
"$JAVA_HOME/bin/java" -cp ./../../lib/BaseInstaller.jar:./../../lib/WinRegistry.jar -splash:./../../resources/Setup.jpg com.infor.install.MainProgram $1 $2 $3 $4
export PATH=$OLDPATH
cd "$ESCUR_DIR"
unset ESCUR_DIR
