@echo off
set HTTPSERVERLIB=..\lib

if Exist "%ULCSWINGHOME%\swingall.jar" goto useulcswinghome
if Exist "%SWING_HOME%\swingall.jar" goto useswinghome
echo The environment variable ULCSWINGHOME or SWING_HOME must be specified and point to swingall.jar
pause
goto end

:useswinghome
set SWINGLIBS=%SWING_HOME%
goto continue

:useulcswinghome
set SWINGLIBS=%ULCSWINGHOME%

:continue
if Exist "%ULCUIHOME%\uiengine.jar" goto useulcuihome
if Exist "..\..\..\UIEngine\uiengine.jar" goto userelativepath
echo The environment variable ULCUIHOME Must be Specified
pause
goto end

:useulcuihome
set UILIB=%ULCUIHOME%\lib
goto continue1

:userelativepath
set UILIB=..\..\..\uiengine\lib

:continue1
set startUpClass=com.ibm.ulc.HttpServer.HttpServer
if Exist %ULCJREROOT% goto usejreroot
@echo on
jre -cp %SWINGLIBS%\swingall.jar;%UILIB%\ulcCorba.jar;%UILIB%\ulcCorbaImpl.jar;%UILIB%\uiengine.jar;%UILIB%;%HTTPSERVERLIB%;%HTTPSERVERLIB%\httpserver.jar %startUpClass% %1 %2 %3 %4 %5
goto end

:usejreroot
@echo on
%ULCJREROOT%\bin\jre -Djava.home=%ULCJREROOT% -cp %SWINGLIBS%\swingall.jar;%UILIB%\ulcCorba.jar;%UILIB%\ulcCorbaImpl.jar;%UILIB%\uiengine.jar;%UILIB%;%HTTPSERVERLIB%;%HTTPSERVERLIB%\httpserver.jar %startUpClass% %1 %2 %3 %4 %5
:end