1

In a windows environemnt, how can I invoke groovy without having to specifiy the classpath for a given set of JARs each time? I am trying to create a script for an admin so that he can just type groovy deploy [project name].

Edit: Is there anyway to do this through a class path environment variable? Or some other centralized configuration?

Zombies
  • 25,039
  • 43
  • 140
  • 225
  • Take a look at http://stackoverflow.com/questions/306139/how-do-i-include-jars-in-a-groovy-script and http://stackoverflow.com/questions/254385/how-do-i-auto-load-a-database-jar-in-groovy-without-using-the-cp-switch. – ataylor Apr 16 '10 at 20:52

1 Answers1

1

The typical way to do this is to write a shell script that calls the Groovy/Java program and passes the desired classpath on the command line.

Michael Borgwardt
  • 342,105
  • 78
  • 482
  • 720