无法从IntelliJ IDEA运行Application.groovy

时间:2015-06-04 22:26:45

标签: intellij-idea grails-3.0

我使用>>> [i[1] for i in sorted(zip(L, range(4)))] [1, 0, 2, 3] 命令创建了一个新的grails 3项目。当我尝试从IntelliJ IDEA运行grails create-app时,我收到以下错误

Application.main()

如果我使用Exception in thread "main" java.lang.ExceptionInInitializerError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:122) Caused by: java.lang.NullPointerException at grails.dev.Support.enableAgentIfNotPresent(Support.groovy:54) at grails.dev.Support$enableAgentIfNotPresent.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:114) at test.Application.<clinit>(Application.groovy) ... 3 more 运行应用程序,应用程序将启动。我的系统配置如下:

gradle bootRun

1 个答案:

答案 0 :(得分:1)

您需要将Win 7 64 bit IntelliJ IDEA 14.1.3 community edition Grails 3.0.1 GRAILS_HOME=D:\grails-3.0.1\bin Java 1.8.45 JAVA_HOME=C:Program Files\Java\jdk1.8.0_45 变量设置为Grails安装的根目录,而不是bin文件夹

GRAILS_HOME