Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.5.6
-
None
-
None
-
Windows XP
Description
The startGroovy.bat file supplied with Groovy 1.5.6 does not pass the System CLASSPATH variable onto the GroovyStarter class. The Unix startGroovy does the following -
if [ -n "$CP" ] ; then
CP="$CP":.
elif [ -n "$CLASSPATH" ] ; then
CP="$CLASSPATH":.
else
CP=.
fi
The Windows startGroovy.bat does -
if "x" == "x%CP%" goto empty_cp
:non_empty_cp
set CP=%CP%;.
goto after_cp
:empty_cp
set CP=.
:after_c
Note , the CLASSPATH variable is ignored.
I think this issue is the result of the fix for issue GROOVY-2644. In 1.5.5 the equivalent bit of script did the following -
if "x" == "x%CP%" goto empty_cp
:non_empty_cp
set CP=%CP%;.
goto after_cp
:empty_cp
set CP=.
if "x" == "x%CLASSPATH%" goto after_cp
set STARTER_CLASSPATH=%STARTER_CLASSPATH%;%CLASSPATH%
:after_cp
So, the CLASSPATH in 1.5.5 was passed on via the STARTER_CLASSPATH to the Java executable.
Suggest that the correct script should be -
if "x" == "x%CP%" goto empty_cp
:non_empty_cp
set CP=%CP%;.
goto after_cp
:empty_cp
set CP=.
if "x" == "x%CLASSPATH%" goto after_cp
set CP=%CLASSPATH%;%CP%
:after_cp