Hi Groovy Users!

I am new to Groovy and trying 2.4.11 on Windows (8.1).

The "Invoke dynamic support" page on the Groovy-lang.org site says:

The usual way to run a script from the command line is by "groovy foo.groovy", where foo.groovy is the groovy program in source form. To use indy for this you have to use the indy distribution and "groovy --indy foo.groovy". Doing this
without the indy distribution will result in an error message.

But if I remove all indy-related jars from the distribution, my scripts still run with the --indy switch without any error message.

When I set DEBUG, "groovy --indy test.groovy" results the following:

"C:\Program Files\Java\jdk1.8.0_121\bin\java.exe" "-Xmx128m" -Dprogram.name="" -Dgroovy.home="c:\Groovy" -Dtools.jar="C:\Program Files\Java\jdk1.8.0_121\lib\tools.jar" -Dgroovy.starter.conf="c:\Groovy\conf\groovy-starter.conf" -Dscript.name="C:\Temp\--indy" -classpath "c:\Groovy\lib\groovy-2.4.11.jar" org.codehaus.groovy.tools.GroovyStarter --main groovy.ui.GroovyMain --conf "c:\Groovy\conf\groovy-starter.conf" --classpath "." --indy test.groovy

Note the

-Dscript.name="C:\Temp\--indy"

part - is it OK?

Is there a way to check whether my script runs with invokedynamic support?

Best regards:

J.


Reply via email to