@echo off
setlocal EnableDelayedExpansion

@rem check if PalmSDK installed
if not defined PalmSDK goto :NoSDK

@rem the app jar
set APP_JAR=worm.jar

@rem the command name
for %%c in (%0) do set PALM_COMMAND=%%~nc

@rem the jars dir
set JARS_DIR=!PalmSDK!\share\jars

@rem the jar file
set JAR_FILE=!JARS_DIR!\!APP_JAR!

@rem the vm arguments
set VM_OPTS=-Xmx256m

@rem launch the app
java %VM_OPTS% -jar "%JAR_FILE%" %*
goto :EOF

:NoSDK
@rem show error message
echo PalmSDK variable not set
exit /b 1
