[groovy-user] trouble getting groovy running on OS X

6 views
Skip to first unread message

phil swenson

unread,
Apr 10, 2008, 8:21:21 PM4/10/08
to us...@groovy.codehaus.org
I'm an OS X newbie....

I followed the instructions at : 
http://groovy.codehaus.org/Installing+Groovy

I installed groovy to /Users/pswenson/Applications/groovy/

my .bash_profile looks like:
export JAVA_HOME=/Library/Java/Home
export GROOVY_HOME=/Users/pswenson/Applications/groovy/
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$GROOVY_HOME/bin:~/scripts:$PATH"

when I run groovysh as in the instructions I get:
zeppelin:~ pswenson$ groovysh
java.lang.NoClassDefFoundError: org/objectweb/asm/Opcodes
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)

 etc

Any thoughts?

Robert J. Carr

unread,
Apr 10, 2008, 8:26:19 PM4/10/08
to us...@groovy.codehaus.org
That $JAVA_HOME looks really off. Here's mine (for leopard):

JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home

There are weird symlinks so you might want to verify that CurrentJDK
points to what you're interested in.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Jim White

unread,
Apr 10, 2008, 9:34:31 PM4/10/08
to us...@groovy.codehaus.org
phil swenson wrote:

> I'm an OS X newbie....
>
> I followed the instructions at :
> http://groovy.codehaus.org/Installing+Groovy
>
> I installed groovy to /Users/pswenson/Applications/groovy/
>
> my .bash_profile looks like:
> export JAVA_HOME=/Library/Java/Home
> export GROOVY_HOME=/Users/pswenson/Applications/groovy/

Remove the trailing "/" from GROOVY_HOME and it will work fine.

With a trailing "/" your path doesn't refer to an actual directory,
although some scripts are smart enough to strip them off. You could
open a JIRA to suggest that as an improvement and/or enhance the wiki
page if you like.

Your JAVA_HOME is fine as that is a symlink to the framework's path.
Groovy will also launch fine without JAVA_HOME set.

Jim

phil swenson

unread,
Apr 10, 2008, 9:40:51 PM4/10/08
to us...@groovy.codehaus.org
I tried your suggestion, but got the same result.

The /Library/Java/Home has symbolic links to your directory...

I should note that I downloaded the latest and greatest groovy (1.5.4).  Has anyone else gotten this going on OS X using the same method I did?

thanks
phil

phil swenson

unread,
Apr 10, 2008, 9:49:12 PM4/10/08
to us...@groovy.codehaus.org
Yep, that was it.... I just overlooked it.

thanks!

 
Reply all
Reply to author
Forward
0 new messages