Most of the Groovy executables that support "--classpath" (like GroovyMain, Console etc.) currently support it via the startup shell scripts. It remains in the CLI processing for each class so that it appears in the usage instructions.
On Sat, May 18, 2019 at 2:47 AM Milles, Eric (TR Tech, Content & Ops) < eric.mil...@thomsonreuters.com> wrote: > Both GroovyMain and Console claim to accept "--classpath" arguments, > however neither class has any processing for them. How are these arguments > supported? Is GroovyMain or Console supposed to be able to be run > programatically? > > > What I am trying to do is use GroovyStarter to bootstrap a basic > Java/Groovy environment that groovy.ui.GroovyMain (for scripts) or > groovy.ui.Console (for interaction) can be run from. What I am finding is > that the classpath given to GroovyStarter is not propagating to > GroovyMain. So I try and move the "--classpath" arguments from > GroovyStarter to GroovyMain and the latter just ignores them. I'd > actually prefer if GroovyStarter properly transferred its classpath to its > "--main" class. >