@echo off
setlocal EnableDelayedExpansion

@rem check if PalmSDK installed
if not defined PalmSDK goto :NoSDK

@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=!JARS_DIR!\webos-tools.jar

@rem launch the app
java -jar "%JAR%" %PALM_COMMAND% %*
goto :EOF

:NoSDK
@rem show error message
echo PalmSDK variable not set
exit /b 1
