在JDK中运行Eclipse? [英] Run Eclipse in JDK?
问题描述
是否可能(以及如何)在 JDK 中运行eclipse,而不是在 JRE 中运行eclipse?
当我打开eclipse时,我继续接收以下错误:
Is it possible (and how) to run eclipse in JDK and not in a JRE?
When I open eclipse, I keep receiving the following error:
Eclipse is running in a JRE, but a JDK is required
(错误由m2eclipse插件生成)
(the error is generated by the m2eclipse plug-in)
更新:
以下是我已经拥有的一些相关配置:
UPDATE:
Here's some of the relevant configuration I already have:
更新2
在跟随rhinds的建议之后,我拆分了行之间的-vm和路径,现在我在启动eclipse时收到以下内容:
UPDATE 2
After following rhinds's advice, I split the -vm and path between lines and now I receive the following upon starting eclipse:
我的配置是:
- win 7 64bit
- eclipse-SDK-3.6.2-win32
- jdk-6u25-windows-x64
推荐答案
检查:
首先,在Eclipse中,转到Windows>首选项> Java>已安装的JRE。应该有至少一个JRE列出并勾选 - 检查是否指向您安装的JDK(忽略它指的是安装的JRE - 您可以将其指向您的JDK) - 如果没有,则编辑所选的JRE并将其重命名为JDK目录
Firstly, within Eclipse go to Windows > Preferences > Java > Installed JREs. There should be at least one "JRE" listed and ticked - check if that is pointing to your installed JDK (ignore that it refers to them as installed JREs - you can point this to your JDK) - if its not, then edit the selected JRE and repoint it to you JDK directory
如果您仍然收到错误,请打开eclipse.ini文件(将在您的eclipse安装的根目录中)在文本编辑器中打开它,如记事本++等),并将其插入文件的顶部:
If you are still getting the error, then open up your eclipse.ini file (will be in the root of your eclipse install - open it in a text editor like notepad++ etc) and insert this at the top of the file:
-vm
C:/Java/jdk1.6/bin/javaw.exe
(显然指向你的javaw。 exe在您安装的JDK目录中)
(obviously pointing to your javaw.exe in your installed JDK directory)
一旦您的.ini文件更新,请重新启动,您不应该再收到错误。
Once your .ini file is updated, restart and you should not get the error anymore.
这篇关于在JDK中运行Eclipse?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!