Monday, December 7, 2009

Using Groovy from the .zip file

I had always had trouble launching groovysh or groovyConsole from the .zip releases of groovy, and always waited until they released the installer for Windows, never knowing why. There is a simple fix, but one that didn't occur to me right away. The cause is that the GROOVY_HOME variable needs set before startGroovy.bat tries to add it to the classpath, so just add

to startGroovy.bat (anywhere before the classpath gets set), and let the good times roll...
This also, of course, overrides whatever you have set as system or user variables, so you can safely play with other versions from the .zips without needing to change anything (or needing admin rights).