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

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

Groovy and grails jdk issue

javaeclipsegrailsgroovy

提问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,并且首选项显示了它,但我仍然收到警告并且它没有构建。我在下面发布了一些图片来展示正在发生的事情。

enter image description here

在此处输入图片说明

Shows JDK found and installed

显示找到并安装的 JDK

java homeenter image description here

爪哇之家在此处输入图片说明

回答by Piyush Chaudhari

  1. on your GGTS go to window
  2. select java
  3. select installed JREs
  4. add-> Standard VM
  5. jRE home select directory up to C:\Program Files\Java\jdk1.6.0_18
  6. select jdk1.6.0_18 from installed JREs
  1. 在您的 GGTS 上转到窗口
  2. 选择Java
  3. 选择已安装的 JRE
  4. 添加->标准VM
  5. jRE home 选择目录到 C:\Program Files\Java\jdk1.6.0_18
  6. 从已安装的 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.

我遇到了类似的问题(我确定这是确切的问题) - 以下是确保它正常工作的步骤,我最初遇到了困难,但最终成功了。

  1. Install JDK from http://www.java.com,in a directory where there are NO SPACESin the path
  2. Set JAVA_HOMEto your JDK installation
  3. Ensure %JAVA_HOME%\bin;is in your PATHvariable.
  4. On the command prompt run java -version, it should give you the path where JDK is installed
  5. Install STS Springsource Tool suite.
  6. Run your STS and create a new grails project and run it.
  1. http://www.java.com安装 JDK ,在路径中没有空格的目录中
  2. JAVA_HOME 设置为您的 JDK 安装
  3. 确保 %JAVA_HOME%\bin; 位于您的PATH变量中。
  4. 在命令提示符下运行java -version,它应该为您提供安装 JDK 的路径
  5. 安装 STS Springsource 工具套件。
  6. 运行您的 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 -vmoption and make sure it is a JDK not a JRE.

查找该-vm选项并确保它是 JDK 而不是 JRE。