@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

if Exist "%ULCSWINGHOME%\swingall.jar" goto useulcswinghome
set SWINGLIBS=%SWING_HOME%
goto continue

:useulcswinghome
set SWINGLIBS=%ULCSWINGHOME%


: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\jre.exe" goto usejreroot

jre -cp %HTTPSERVERLIB%\httpserver.jar;%SWINGLIBS%\swingall.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\jre -Djava.home=%ULCJREROOT% -cp %SWINGLIBS%\swingall.jar;%HTTPSERVERLIB%\httpserver.jar;%UILIB%\ulcCorba.jar;%UILIB%\ulcCorbaImpl.jar;%UILIB%;%UILIB%\uiengine.jar;;%HTTPSERVERLIB% %startUpClass% %1 %2 %3 %4 %5 %6 %7 %8 %9
:end




