@echo off
if Exist "%ULCUIHOME%\lib\uiengine.jar" goto useulcuihome
if Exist "..\..\UIEngine\lib\uiengine.jar" goto userelativepath
echo ERROR: The environment variable ULCUIHOME Must be Specified
echo	  : (eg: c:\ULC\R2.x\UIEngine)
pause
goto end

:userelativepath
set ULCUIHOME=..\..\UIEngine
echo WARNING: Environment variable ULCUIHOME not set.
echo        : Using relative path[%ulcuihome%]

:useulcuihome
set HTTPSERVERLIB=..\lib


:continue
set UILIB=%ULCUIHOME%\lib
set startUpClass=com.ibm.ulc.HttpServer.HttpServer
echo Running: %startUpClass% %1 %2 %3 %4 %5 %6 %7 %8 %9

if Exist "%ULCJREROOT%\bin\java.exe" goto usejreroot

java -cp %HTTPSERVERLIB%\httpserver.jar;%UILIB%\ulcCorba.jar;%UILIB%\ulcCorbaImpl.jar;%UILIB%\uiengine.jar;%UILIB%;%HTTPSERVERLIB% %startUpClass% %1 %2 %3 %4 %5 %6 %7 %8 %9
goto end

:usejreroot
%ULCJREROOT%\bin\java -Djava.home=%ULCJREROOT% -cp %HTTPSERVERLIB%\httpserver.jar;%UILIB%\ulcCorba.jar;%UILIB%\ulcCorbaImpl.jar;%UILIB%\uiengine.jar;%UILIB%;%HTTPSERVERLIB% %startUpClass% %1 %2 %3 %4 %5 %6 %7 %8 %9
:end




