Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 1.5.4, 1.5.6, 1.6-beta-1
-
Fix Version/s: 1.5.7, 1.6-beta-2
-
Component/s: None
-
Labels:None
-
Environment:Windows XP
Groovy Version: 1.6-beta-1 JVM: 1.5.0_15
Groovy Version: 1.5.6 JVM: 1.5.0_15-b04
Groovy Version: 1.5.4 JVM: 1.5.0_15-b04
Description
Setting classpath per command line option when starting script with groovy command (.bat file version) does not work, neither with -cp nor with -classpath:
D:\Workarea\TestSource>groovy -cp ..\Classes MyAppTest.groovy
error: no argument for:c
usage: groovy [options] [args]
options:
-p process files line by line and print result
(see also -n)
-D,--define <name=value> define a system property
-a,--autosplit <splitPattern> split lines using splitPattern (default '\s')
using implicit 'split' variable
-c,--encoding <charset> specify the encoding of the files
-d,--debug debug mode will print out full stack traces
-e <script> specify a command line script
-h,--help usage information
-i <extension> modify files in place; create backup if
extension is given (e.g. '.bak')
-l <port> listen on a port and process inbound lines
-n process files line by line using implicit
'line' variable
-v,--version display the Groovy and JVM versions
D:\Workarea\TestSource>groovy -classpath ..\Classes MyAppTest.groovy Caught: java.lang.IllegalArgumentException: D:\Workarea\Classes (D:\Workarea\Classes) is a directory not a Groovy source file.
does --classpath work? It appears to for me.