kawa.bat.in 882 B

1234567891011121314151617181920212223242526272829303132
  1. @echo off
  2. rem Ideas and some code re-used from Ant's ant.bat.
  3. @setlocal
  4. if "%KAWA_HOME%"=="" goto setDefaultKawaHome
  5. :stripKawaHome
  6. if not _%KAWA_HOME:~-1%==_\ goto endKawaHome
  7. set KAWA_HOME=%KAWA_HOME:~0,-1%
  8. goto stripKawaHome
  9. :setDefaultKawaHome
  10. set KAWA_HOME=%~dp0..
  11. rem set THIS_SCRIPT2=%~dp$PATH:0
  12. :endKawaHome
  13. :checkJava
  14. set _JAVACMD=%JAVACMD%
  15. if "%JAVA_HOME%" == "" goto noJavaHome
  16. if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
  17. if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
  18. goto endcheckJava
  19. :noJavaHome
  20. if "%_JAVACMD%" == "" set _JAVACMD=java.exe
  21. :endcheckJava
  22. set KAWA_PATH=%KAWA_HOME%\lib\kawa.jar
  23. rem ??? set EXTRA_PATH=@DEFAULT_EXTRA_PATH@
  24. set KAWA_EXTRA_PATH="%KAWA_HOME%\lib\jline.jar;%KAWA_HOME%\lib\domterm.jar;%KAWA_HOME%\lib\servlet.jar"
  25. "%_JAVACMD%" -Dkawa.home="%KAWA_HOME%" -classpath "%KAWA_PATH%;%KAWA_EXTRA_PATH%" kawa.repl %*%