Java org.codehaus.groovy.grails.cli.support.GrailsS​​tarter 未找到错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24577480/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-14 13:09:07  来源:igfitidea点击:

org.codehaus.groovy.grails.cli.support.GrailsStarter not found error

javagrailsgroovygrails-2.0

提问by confile

After updating from Grails 2.3.10 to 2.3.11 and updating the path variable to

从 Grails 2.3.10 更新到 2.3.11 并将路径变量更新为

export GRAILS_HOME=/Applications/grails/grails-2.3.11

When I run: grails I get the following error:

当我运行时:grails 我收到以下错误:

Error: Main class org.codehaus.groovy.grails.cli.support.GrailsStarter could not be found

采纳答案by confile

I found the solution. If you go to the grails/bin folder and run grails from the command line you can close the console afterwards and when you open the console again the problem will be fixed.

我找到了解决方案。如果您转到 grails/bin 文件夹并从命令行运行 grails,您可以在之后关闭控制台,当您再次打开控制台时,问题将得到解决。

回答by Martin Hauner

You are probably still running grails 2.3.10.

您可能仍在运行 grails 2.3.10。

You have to update GRAILS_HOMEand you also have to update your path to use the new grails version, i.e. your path must include $GRAILS_HOME/bin.

您必须更新GRAILS_HOME并且您还必须更新您的路径以使用新的 grails 版本,即您的路径必须包含$GRAILS_HOME/bin.

回答by Dan

You could just use gvmto install your version then use it to manage your versions.

您可以使用它gvm来安装您的版本,然后使用它来管理您的版本。

回答by Shastings

I'm using Grails installed with GVM, and I've also run into this issue after updating environment variables in the profile and sourcing in the new changes. I was able to fix the problem simply by closing and reopening the terminal.

我正在使用与 GVM 一起安装的 Grails,并且在更新配置文件中的环境变量并在新更改中进行采购后,我也遇到了这个问题。我只需关闭并重新打开终端即可解决问题。

回答by Florian Popa

You must update your jdk version. I was using jdk1.8.0_11 and it resolved with jdk1.8.0_45.

您必须更新您的 jdk 版本。我使用的是 jdk1.8.0_11,它用 jdk1.8.0_45 解决了。

回答by sgiri

Solution:

解决方案:

Make sure you have environment variable set correctly.

确保正确设置了环境变量。

  1. Go to grails/bin folder $cd /Applications/grails/grails-2.3.11/bin
  2. Then run grails from command line $./grails
  1. 转到 grails/bin 文件夹 $cd /Applications/grails/grails-2.3.11/bin
  2. 然后从命令行运行 grails $./grails

When you run this command, necessary files for your grails will be downloaded.

运行此命令时,将下载 grails 所需的文件。

  1. Close your terminal
  2. Now check your grails version from terminal $grails -version
  1. 关闭你的终端
  2. 现在从终端检查您的 grails 版本 $grails -version

There won't be any errors.

不会有任何错误。

回答by YRP

I ran the below commands: 1. To set path to contain jdk 1.8.0_144 bin folder & Grails bin folder. 2. Set JAVA_HOME to jdk1.8.0_144 3. set GRAILS_HOME to Grails-2.4.3 folder.

我运行了以下命令: 1. 设置路径以包含 jdk 1.8.0_144 bin 文件夹和 Grails bin 文件夹。2. 将 JAVA_HOME 设置为 jdk1.8.0_144 3. 将 GRAILS_HOME 设置为 Grails-2.4.3 文件夹。

And it worked !!!

它奏效了!!!

回答by Tung

The question and answers seems to be out-of-date. I have encountered the same problem but it has been fixed by replying the discussion here. The easiest way to resolve the issue is to run the following command:

问题和答案似乎已过时。我遇到了同样的问题,但已通过回复此处的讨论解决。解决问题的最简单方法是运行以下命令:

chmod +x .sdkman/bin/sdkman-init.sh

chmod +x .sdkman/bin/sdkman-init.sh

which helped me out.

这帮助了我。