Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have downloaded groovy-binary-1.7.10.zip, 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 java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Sarbbottam-Bandyopadhyays-MacBook-Pro:bin sarbbottam$

Do you have any suggestion?

share|improve this question
add comment

3 Answers

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
add comment

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
    
I have figured it out. tshawkins.blogspot.com/2008/03/groovy-on-leopard.html –  Sarbbottam Bandyopadhyay Apr 22 '11 at 15:25
add comment

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.

Regards,

share|improve this answer
add comment

Your Answer

 
discard

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.