Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have downloaded, unzipped @ /Users/sarbbottam/SW Developments/groovy-1.7.10 and navigated to /Users/sarbbottam/SW Developments/groovy-1.7.10/bin. I tried to execute ./groovysh; however, I got the below error.

Sarbbottam-Bandyopadhyays-MacBook-Pro:bin sarbbottam$ ./groovysh
Exception in thread "main" java.lang.NoClassDefFoundError: Developments/groovy-1/7/10/bin/groovy/icns
Caused by: java.lang.ClassNotFoundException: Developments.groovy-1.7.10.bin.groovy.icns
    at Method)
    at java.lang.ClassLoader.loadClass(
    at sun.misc.Launcher$AppClassLoader.loadClass(
    at java.lang.ClassLoader.loadClass(
Sarbbottam-Bandyopadhyays-MacBook-Pro:bin sarbbottam$

Do you have any suggestion?

share|improve this question

Try renaming your SW Developments folder to one word (with no spaces or an underscore).

Looks like the space is causing a problem in loading the library.

share|improve this answer
I do not think that space cause a problem. SW Developments is written as either SW\ Developments or "SW Developments". – Sarbbottam Bandyopadhyay Apr 22 '11 at 15:27

You need to install groovy in a path without spaces in it - this would be the easiest solution.

Otherwise you need to edit almost all of the groovy scripts in the bin folder - each time you upgrade too.

share|improve this answer

It can also be achieved by using the following:

Unpack the archive and move it to /usr/share

$cd /usr/share
$sudo chown -R root:wheel groovy-1.7.10/
$sudo chmod 0755 groovy-1.7.10/bin/*
$sudo ln -s groovy-1.7.10 groovy
$cd /usr/local/bin
$ln -s /usr/share/groovy/bin/groovy groovy
$ln -s /usr/share/groovy/bin/groovyc groovyc

There is no need to alter the $PATH. /usr/local/bin is already in $PATH. So just make a symbolic link of /usr/share/groovy/bin/groovy and /usr/share/groovy/bin/groovyc in /usr/local/bin.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.