groovy ignores --classpath given on command line. Reproducible: Always Steps to Reproduce: # echo 'class A {}' > A.groovy # groovy --classpath . -e 'new A()' Actual Results: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: script_from_command_line: 1: unable to resolve class A @ line 1, column 1. new A() ^ 1 error Expected Results: no error This one work correctly: # CLASSPATH=. groovy -e 'new A()'
*** Bug 453210 has been marked as a duplicate of this bug. ***
This is a bug caused by the way we create our launchers to execute Java programs. The -cp/-classpath option is already set in stone within the launcher and as far as I can see, specifying it again doesn't override the launcher classpath nor it updates it. Basically, as if you were trying to run: java -cp /some/java/program.jar:. -cp /some/other.jar:. org.gentoo.java.Main. java picks the values specified in the 1st -cp option and ignores the ones passed to the 2nd -cp option. We should look into this issue.
Package removed.