@echo off
rem
rem pragma ident	"@(#)sdm.script 1.14	02/08/07 SMI"
rem
rem Copyright (c) 2001-2002 by Sun Microsystems, Inc.
rem All rights reserved.
rem

rem The script starts Sun (TM) Download Manager

echo Sun (TM) Download Manager
echo Copyright (c) 2001-2002 by Sun Microsystems, Inc.
echo All rights reserved.

rem Check that Java classes for the Sun (TM) Download Manager are available
if exist .\sdm.jar goto java
echo ERROR: Unable to find Java classes for the Sun (TM) Download Manager.
echo ERROR: Run the script in the home directory of the utility.
goto exit

:java
echo Starting Java interpreter...

rem Show version of Java interpreter
java -version
if errorlevel 0 goto start
echo ERROR: Java interpreter reported a problem. Please, check the
echo ERROR: output log.
goto exit

:start
rem Run the Sun (TM) Download Manager in Java interpreter
java -classpath %CLASSPATH%;.\sdm.jar; -Dhomedir=. -Dpropdir=. com.sun.sdm.SunDownloadManager %1 %2 %3 %4 %5 %6 %7 %8 %9
if errorlevel 0 goto exit
echo ERROR: Java interpreter reported a problem. Please, check the
echo ERROR: output log.
goto exit

:exit
