Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 1.6.4
-
Fix Version/s: None
-
Component/s: command line processing
-
Labels:None
-
Environment:Windows XP Professional
Groovy Version: 1.6.4
JVM: 1.6.0_15
-
Number of attachments :
Description
I'm trying to invoke groovy with two directories in the classpath,
groovy --classpath ./lib/*.jar;./src -e "print 'ok'"
This fails with the error (I have set DEBUG=ON)
... C:>call :get_arg "./lib/*.jar;./src" "-de -qprint 'ok'-q" C:>rem remove quotes around first arg C:>for %i in ("./lib/*.jar;./src") do set _ARG= %~i C:>rem set the remaining args C:>set _ARGS="-de -qprint 'ok'-q" C:>remove the leading space we'll add the first time The syntax of the command is incorrect. C:\>if "x~0,1_ARG:~1
I get the same results for
groovy --classpath "./lib/*.jar;./src" -e "print 'ok'"
groovy --classpath "./lib/*;./src" -e "print 'ok'"
groovy --classpath ./lib/*.jar;./src -e "print 'ok'"
Now, I try
groovy --classpath ./src2;./src src/MyScript.groovy
This runs groovy but ./src is missing from the classpath:
C:\>"c:\Program Files\Java\jre6\bin\java.exe" "-Xmx128m" -Dprogram.name="" -Dgroovy.home="C:\Program Files\Groovy\Groovy-1.6.4" -D groovy.starter.conf="C:\Program Files\Groovy\Groovy-1.6.4\conf\groovy-starter.conf" -Dscript.name="C:\src" -classpath "C:\Program Files\Groovy\Groovy-1.6.4\lib\groovy-1.6.4.jar" org.codehaus.groovy.tools.GroovyStarter --main groovy.ui.GroovyMain --conf "C:\Pro gram Files\Groovy\Groovy-1.6.4\conf\groovy-starter.conf" --classpath "./src2;." src/MyScript.groovy
It is the '*' character which is causing the issue not the quotes which would only make a difference if there were spaces in the classpath.