Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.8.2
-
None
-
None
-
Ubuntu 11.04 amd64, 64-bit sun java
java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)
Description
Put this code in A.groovy
class A { public static void main(String[] args) { args.each { println it } } }
Run
groovy -Da=b A.groovy -no-file
Actual output:
-n o-file
Expected output:
-no-file
Omitting the -Da=b causes the arguments to be processed correctly. It appears that groovy's startup script is calling java correctly. In other words, running this command:
/opt/jdk/bin/java -classpath /opt/groovy/lib/groovy-1.8.2.jar -Dscript.name=/opt/groovy/bin/groovy -Dprogram.name=groovy -Dgroovy.starter.conf=/opt/groovy/conf/groovy-starter.conf -Dgroovy.home=/opt/groovy -Dtools.jar=/opt/jdk/lib/tools.jar org.codehaus.groovy.tools.GroovyStarter --main groovy.ui.GroovyMain --conf /opt/groovy/conf/groovy-starter.conf --classpath . -Da=b A.groovy -no-file
results in the same output.
Attachments
Issue Links
- is related to
-
GROOVY-5191 Running script with '--enoding' param and some script parameters
- Closed
-
GROOVY-5282 upgrade Apache Commons CLI to version 1.3
- Closed