Listing of Source startserver.bat
@echo off
setlocal

rem --- The classpath ---
set CP=.;NetPhantomServer.jar;NetRexxR.jar;bcprov.jar;bcpkix.jar;acme-np.jar;openxml-1.2-np.jar;mail.jar;activation.jar;derby.jar

rem --- The memory settings ---
set MEM=-Xms64m -Xmx300m

rem --- Java executable ---
set JAVA_EXE=java.exe

rem --- Change to drive and directory of this batch file ---
for %%x in (%0) do set BatchPath=%%~dpsx
for %%x in (%BatchPath%) do set BatchPath=%%~dpsx
set CURRDIR=%BatchPath%
set CURRDRIVE=%~d0
%CURRDRIVE%
cd %CURRDIR%

rem --- Check if it's a Quick Start installation, use Java SE 8 if present ---
if exist jre8-64\bin\java.exe  set JAVA_EXE=jre8-64\bin\java.exe & goto foundVM
if exist jdk8\bin\java.exe     set JAVA_EXE=jdk8\bin\java.exe    & goto foundVM
:foundVM

echo *** Starting the NetPhantom Server ***
goto start

:upgrade
echo *** Upgrading the NetPhantom Server ***
"%JAVA_EXE%" -classpath . UpgradeNetPhantomServer > upgrade.log
if errorlevel 1 goto uperror

:restart
echo *** Restarting the NetPhantom Server ***

:start
"%JAVA_EXE%" %MEM% -classpath %CP% se.entra.phantom.server.Start restart %1
if errorlevel 1001 goto upgrade
if errorlevel 1000 goto restart
if errorlevel 1 goto error

echo *** The NetPhantom Server has stopped executing ***
goto done

:uperror
echo *** Error upgrading the NetPhantom Server ***
pause
goto done

:error
echo *** Error when starting or restarting the NetPhantom Server ***
pause

:done
endlocal

exit