为 Eclipse 设置正确的 PATH [英] Setting the correct PATH for Eclipse
问题描述
我最近改变了我的路径,所以我可以在 Head First Java 书中继续学习,而且我之前使用过 Eclipse.现在,当我再次尝试进入 Eclipse 时,它不会打开,因为它说它在我的目录中找不到要使用的 JRE 或 JDK.我已经移动了 JDK 文件.我已经下载了 jdk1.8.0_60.那么如何让 Eclipse 再次打开?
I recently changed my path so I could follow along in the Head First Java book and I had Eclipse before. Now when I try to get onto Eclipse again it won't open because it says it can't find a JRE or JDK to use in my directory. I have moved the JDK file around. I have jdk1.8.0_60 downloaded. So how can I get Eclipse to open again?
推荐答案
Eclipse 不查询 JAVA_HOME
变量
Eclipse doesn't consult the
JAVA_HOME
variable
您应该在文件 eclipse.ini
中指定 Eclipse 应该在哪里找到您的 JDK.具体如下参数(注意是ini文件中的2行):
You should specify where Eclipse should find your JDK in the file eclipse.ini
. Specifically, the following parameter (note that it is 2 separate lines in the ini file):
-vm
C:JavaJDK1.8injavaw.exe
或者你的 javaw.exe 所在的任何地方.
or wherever your javaw.exe happens to be.
注意: ini
文件的格式很特别;请务必查阅 https://wiki.eclipse.org/Eclipse.ini 以确保您获得完全正确.
Note: The format of the ini
file is very particular; make sure to consult https://wiki.eclipse.org/Eclipse.ini to ensure you get it exactly right.
这篇关于为 Eclipse 设置正确的 PATH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!