Skip to content

Commit 26b1891

Browse files
committed
space enabling filespecs
Switches CLASSPATH's backslashes to slashes to allow spaces in file and folder paths
1 parent 88d47c9 commit 26b1891

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

‎koans/run.bat‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1-
@echo off
2-
cls
1+
rem @echo off
2+
rem cls
33
setLocal EnableDelayedExpansion
4-
set CLASSPATH="%~dp0app\bin;"%~dp0\app\config"
5-
for /R "%~dp0\app\lib" %%a in (*.jar) do (
6-
set CLASSPATH=!CLASSPATH!;%%a
4+
set string=%~dp0
5+
set string=%string:\=/%
6+
set CLASSPATH="%string%app/bin";"%string%app/config"
7+
for /R "%~dp0/app/lib" %%a in (*.jar) do (
8+
set string=%%a
9+
set string=!string:\=/!
10+
set CLASSPATH=!CLASSPATH!;"!string!"
711
)
8-
set CLASSPATH=!CLASSPATH!;"
12+
set CLASSPATH=!CLASSPATH!;
913
javac -version
1014
if ERRORLEVEL 3 goto no_javac
1115
java -version
1216
if ERRORLEVEL 1 goto no_java
13-
cls
17+
rem cls
1418
java -Dapplication.basedir="%~dp0"" -classpath %CLASSPATH% com.sandwich.koan.runner.AppLauncher %1 %2 %3 %4 %5 %6 %7 %8 %9
1519

1620
goto end

0 commit comments

Comments
 (0)