Grails命令无法启动

时间:2015-02-03 06:52:42

标签: java grails

当我在命令行上运行grails时,我得到了

Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "main"
  • 我将JAVA_HOME设为/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home
  • java -version返回:
    java version "1.7.0_75" Java(TM) SE Runtime Environment (build 1.7.0_75-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)

  • grails 版本为2.4.3

我已经陷入困境。该错误消息根本没有帮助。如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

通过运行解决它

cd /System/Library/Frameworks/JavaVM.framework/Versions 
rm CurrentJDK 
ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents CurrentJDK

在终端。