I tried to install groovy in windows 7.
I Downloaded archive from groovy site.
Unzip it.
Add GROOVY_HOME
path to environment.
Add bin path to environment.
After that I rebooted windows.
But when I try to run groovy from cmd I get error:
Error: Could not find or load main class org.codehaus.groovy.tools.GroovyStarter
You just need to set GROOVY_HOME
to your Groovy directory, for example:
GROOVY_HOME=C:\groovy\groovy-2.4.6
And JAVA_HOME
to JRE
Make sure that both GROOVY_HOME/bin
and JAVA_HOME/bin
are available in your PATH
You may have directories of other Groovy versions in your path. If you have installed Groovy before (may be years ago - doesn't matter), check your environment variables, especially PATH
, for other Groovy distributions.
The file %GROOVY_HOME%/conf/groovy-starter.conf
gives some more hints of what actually happens while starting the binaries. Having this in mind, the cause of your problem may be the usage of the wrong binaries. That may result in the expectation of other classes or class names than provided by the up to date GROOVY_HOME
directories - eventually yielding your error.
Check all your paths twice for this.
UPDATE:
I accidentally just ran into that problem because I was messing around with Groovy-versions (just as I told you not to ;)). Here is an easy hint how to find out if all paths are correct (for Windows).
cmd
.set DEBUG=true
to activate the Debug-Statements.groovysh
(requesting the interactive Groovy-shell).cheers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With