@echo off



if not "%ECHO%" == ""  echo %ECHO%
if "%OS%" == "Windows_NT"  setlocal

set MAIN_CLASS=cdac.medinfo.sdk.dcm30_04.services.cservices.tools.cgetscu.CGet_SCU
set MAIN_JAR=cget_scu_tool30_04.jar


rem Read all command line arguments

set ARGS=
:loop
if [%1] == [] goto end
        set ARGS=%ARGS% %1
        shift
        goto loop
:end



if not "%JAVA_HOME%" == "" goto HAVE_JAVA_HOME

set JAVA=java

goto SKIP_SET_JAVA_HOME

:HAVE_JAVA_HOME

set JAVA=%JAVA_HOME%/bin/java

:SKIP_SET_JAVA_HOME

if not "%DERBY_HOME1%" == "" goto SET_DERBY_JARS

:SET_DERBY_JARS
set CP=%CP%;%DERBY_HOME%/lib/derby.jar;
set CP=%CP%;%DERBY_HOME%/lib/derbyclient.jar;

set CP=%CP%;%MAIN_JAR%

set CP=%CP%;./../lib/DICOMBase30_04.jar
set CP=%CP%;./../lib/DICOMNet30_04.jar
set CP=%CP%;./../lib/DIMSECServices30_04.jar
set CP=%CP%;./../lib/IOD30_04.jar
set CP=%CP%;./../lib/commons-codec-1.3.jar;
set CP=%CP%;./../lib/en_US.jar;



"%JAVA%" %JAVA_OPTS% -cp "%CP%" %MAIN_CLASS% %ARGS%

