History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: GROOVY-2794
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Paul King
Reporter: Jim Speakman
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
groovy

Groovy 1.5.6 Windows startGroovy.bat fails to pass CLASSPATH to groovy starter

Created: 30/Apr/08 06:00 AM   Updated: 03/May/08 11:14 PM
Component/s: None
Affects Version/s: 1.5.6
Fix Version/s: 1.6-beta-1, 1.5.7

Time Tracking:
Not Specified

Environment: Windows XP


 Description  « Hide
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



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Paul King - 01/May/08 11:36 PM
Thanks for the suggestion, added.