Grails 2.0.3错误从Windows7中的命令行开始 [英] Grails 2.0.3 error starting from command line in Windows7

查看:100
本文介绍了Grails 2.0.3错误从Windows7中的命令行开始的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我试图在Windows上运行grails应用程序,无法启动grails。

p>

我都从grails.org下载了2.0.3发行版,并从github中提取源代码。



我收到的错误如下:

 错误:可能找不到或加载主类
org.codehaus.groovy.grails.cli.support.GrailsS​​tarter



<寻找解决方案来解决这个问题(有些人已经找到了)并没有取得任何帮助:我找到的所有建议都表明我的环境变量设置不当。 (例如此处



虽然我在设置变量时非常小心。我有以下配置,全部在系统变量下:

  JAVA_HOME C:\java\jdk7 
GRAILS_HOME C :\grails\2.0.3 //当源于源
时,也将其设置为C:\grails\source\grails-core GROOVY_HOME C:\groovy\1.8.6
PATH%JAVA_HOME%\ bin;%GRAILS_HOME%\ bin;%GROOVY_HOME%\bin; $ PATH

在下载groovy并设置环境变量之前和之后,我尝试了一些事情,恐怕在这一点上我已经迷失了方向。 Groovy启动得很好,java开始就好,但grails无法启动。



Windows中的其他人在最新的grails版本中有这个问题吗?

解决方案



Grails正在作为Windows DOS提示符(cmd)的命令。它不是从我在windows上使用的bash中工作的(git bash,出于方便和熟悉linux cmds)。



对于那些发现在这种情况下,请确保您在Windows cmd提示符下尝试此操作。 (那些有洞察到为什么这是在DOS提示符下工作,但不是在一个自定义的linux-like bash中,请权衡,我会更新这个答案,我发现任何发现!)


Hoping a kindred soul can assist with this odd windows problem

I am attempting to run a grails app on windows and am unable to get grails to start.

I have both downloaded the 2.0.3 distro from grails.org and pulled and built the source off of github.

The error I receive is as follows:

Error: Could not find or load main class 
       org.codehaus.groovy.grails.cli.support.GrailsStarter

The searching I've done to find solutions to this problem (which some people have had) have yielded no help: All I've found is suggestions that my environment variables are improperly set up. (e.g. here)

I felt I was quite careful in setting up my variables though. I have the following configured, all under System Variables:

JAVA_HOME C:\java\jdk7
GRAILS_HOME C:\grails\2.0.3  // also set it to C:\grails\source\grails-core when dlded from source
GROOVY_HOME C:\groovy\1.8.6
PATH %JAVA_HOME%\bin;%GRAILS_HOME%\bin;%GROOVY_HOME%\bin;$PATH

I've tried things both before and after downloading groovy and setting that environment variable, and I'm afraid I'm quite lost at this point. Groovy starts just fine, java starts just fine, but grails is unable to start.

Is anyone else in Windows having this issue with the latest grails version?

解决方案

I feel like a fool for not trying this, but...

Grails is working as a command from the Windows DOS prompt (cmd). It is NOT working from the bash I've been using on windows (git bash, out of convenience and familiarity with the linux cmds).

For those of you that find yourselves in this situation, Make SURE you try this in the Windows cmd prompt as well. (Those with any insight into why this is working in the DOS prompt but not in a custom linux-like bash please weigh in, I will update this answer with any findings I come across!)

这篇关于Grails 2.0.3错误从Windows7中的命令行开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆