@echo on
if "%JAVA_HOME%"=="" (
echo The JAVA_HOME environment variable is not set.
goto end
)
set TEMP_CLASSPATH=.;
for %%i in (..\lib\*.jar) do (
set TEMP_CLASSPATH=!TEMP_CLASSPATH!;%%i
)
set TEMP_CLASSPATH=!TEMP_CLASSPATH!.;
echo %TEMP_CLASSPATH%
java -cp %TEMP_CLASSPATH% com.amphibiousrodents.MyJavaProgram
pause
I wrote it in Windows XP (not sure if this has any bearing on anything). When I ran this script from my Eclipse project's
After some digging around someone mentioned that adding a line:
setlocal EnableDelayedExpansion would do the trick. After adding that into the .bat file at the top, the classpath was properly set and the program ran without problem. setlocal EnableDelayedExpansion......hmmmm......shoe
No comments:
Post a Comment