eclipse Groovy 和 grails jdk 问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14663528/
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
Groovy and grails jdk issue
提问by Matt Westlake
I wish I could give you guys more information on what's going on, but I really have no idea. I am trying to install groovy and grails tools suite from springsource and I am having trouble configuring it to work properly. I have the most up to date JDK, and the preferences show it, but I still get warnings and it does not build. I have posted some pictures below to show what is going on.
我希望我能给你们更多关于正在发生的事情的信息,但我真的不知道。我正在尝试从 springsource 安装 groovy 和 grails 工具套件,但无法将其配置为正常工作。我有最新的 JDK,并且首选项显示了它,但我仍然收到警告并且它没有构建。我在下面发布了一些图片来展示正在发生的事情。
回答by Piyush Chaudhari
- on your GGTS go to window
- select java
- select installed JREs
- add-> Standard VM
- jRE home select directory up to C:\Program Files\Java\jdk1.6.0_18
- select jdk1.6.0_18 from installed JREs
- 在您的 GGTS 上转到窗口
- 选择Java
- 选择已安装的 JRE
- 添加->标准VM
- jRE home 选择目录到 C:\Program Files\Java\jdk1.6.0_18
- 从已安装的 JRE 中选择 jdk1.6.0_18
回答by user1811107
I faced a similar issue (I am sure it is the exact issue) - Here are the steps to ensure it works correctly, I struggled with initially but this got it going.
我遇到了类似的问题(我确定这是确切的问题) - 以下是确保它正常工作的步骤,我最初遇到了困难,但最终成功了。
- Install JDK from http://www.java.com,in a directory where there are NO SPACESin the path
- Set JAVA_HOMEto your JDK installation
- Ensure %JAVA_HOME%\bin;is in your PATHvariable.
- On the command prompt run java -version, it should give you the path where JDK is installed
- Install STS Springsource Tool suite.
- Run your STS and create a new grails project and run it.
- 从http://www.java.com安装 JDK ,在路径中没有空格的目录中
- 将JAVA_HOME 设置为您的 JDK 安装
- 确保 %JAVA_HOME%\bin; 位于您的PATH变量中。
- 在命令提示符下运行java -version,它应该为您提供安装 JDK 的路径
- 安装 STS Springsource 工具套件。
- 运行您的 STS 并创建一个新的 grails 项目并运行它。
Let me know if that does not work.
如果这不起作用,请告诉我。
回答by Andrew Eisenberg
It might be that you are launching Eclipse with a JRE even though you have a JDK installed as one of the compilers in your workspace. To find out if you are launching with a JRE or JDK, go to Help -> About GGTS -> Installation details -> Configuration
即使您在工作区中安装了 JDK 作为编译器之一,您也可能使用 JRE 启动 Eclipse。要了解您是使用 JRE 还是 JDK 启动,请转到帮助 -> 关于 GGTS -> 安装详细信息 -> 配置
Look for the -vm
option and make sure it is a JDK not a JRE.
查找该-vm
选项并确保它是 JDK 而不是 JRE。