当我在命令行上运行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
我已经陷入困境。该错误消息根本没有帮助。如何解决这个问题?
答案 0 :(得分:0)
通过运行解决它
cd /System/Library/Frameworks/JavaVM.framework/Versions
rm CurrentJDK
ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents CurrentJDK
在终端。