卸载 Java 并重新安装到新位置后 Eclipse 无法启动
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2090379/
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
Eclipse will not start after uninstalling Java and reinstalling to a new location
提问by stanlick
I reinstalled the JDK tonight because of the embedded space in Program File... and now Eclipse blows up immediately when starting. Is there a config file that needs updating? I tried eclipse -clean with nu luck.
由于程序文件中的嵌入空间,我今晚重新安装了JDK......现在Eclipse在启动时立即爆炸。是否有需要更新的配置文件?我很幸运地尝试了 eclipse -clean。
回答by hhafez
What OS are you using? You need to let eclipse know where your jdk lives. On windows at least it is in the exclipse.ini, change it to put to your knew jdk and it will work
你使用的是什么操作系统?您需要让 eclipse 知道您的 jdk 所在的位置。在 Windows 上,至少它在 exclipse.ini 中,将其更改为放入您知道的 jdk 中,它会起作用
for example on windows you will need something like this in your eclipse.ini
例如,在 Windows 上,您的 eclipse.ini 中将需要类似的内容
-vm
C:\jdk1.6.0_02\jre\bin\java
You can find your eclipse.ini in the root directory of your eclipse installation (ie: where eclipse.exe is)
您可以在 eclipse 安装的根目录中找到您的 eclipse.ini(即:eclipse.exe 所在的位置)
回答by GuruKulki
while eclipse starting it requires java.exe and javaw.exe. so when you installed it at other places. you should specify its location in PATH variable so that it can be used to locate your JVM.
eclipse 启动时需要 java.exe 和 javaw.exe。所以当你在其他地方安装它时。您应该在 PATH 变量中指定它的位置,以便它可以用于定位您的 JVM。
EDIT: and of course remove the old entry.
编辑:当然删除旧条目。
回答by Bugra Hasbek
I know this question has already been solved but i want to share a small detail. if you are using -vm option in eclipse.ini, make sure that it is written before -vmargs option.
我知道这个问题已经解决了,但我想分享一个小细节。如果您在 eclipse.ini 中使用 -vm 选项,请确保它写在 -vmargs 选项之前。
in my case below configuration didn't worked
在我的情况下,以下配置不起作用
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-vm
C:\ibm_jdk_6\bin\javaw.exe
but below configuration worked
但以下配置有效
-vm
C:\ibm_jdk_6\bin\javaw.exe
-vmargs
回答by partkyle
did you eclipse.ini file in the eclipse directory point to a specific -vm? You may need to change it in your eclipse directory.
eclipse目录中的eclipse.ini文件是否指向特定的-vm?您可能需要在 eclipse 目录中更改它。
回答by Andy
You must have fixed this problem by now but I don't see anything in this thread to indicate that.
你现在肯定已经解决了这个问题,但我在这个线程中没有看到任何表明这一点的内容。
I just had the same problem. I updated JDK. The next time I tried to start Eclipse it wouldn't. I fixed the problem by removing all older versions of java and setting the new version in my PATH system environment variable. Actually, I also reinstalled my eclipse but I don't think that had anything to do with the solution. By the way, I'm using Eclipse Galileo (Build id: 20090621-0832) and jdk1.6.0_021.
我只是遇到了同样的问题。我更新了JDK。下次我尝试启动 Eclipse 时,它不会。我通过删除所有旧版本的 java 并在我的 PATH 系统环境变量中设置新版本来解决这个问题。实际上,我还重新安装了 eclipse,但我认为这与解决方案没有任何关系。顺便说一下,我正在使用 Eclipse Galileo(构建 ID:20090621-0832)和 jdk1.6.0_021。
回答by Satya
Use the eclipse clean command; it will make clean and elipse will start
使用 eclipse clean 命令;它将使清洁和椭圆将开始
GOTO_Eclipse_Directory > eclipse -clean
Refer below url : http://www.coderanch.com/t/454501/vc/eclipse-exe-not-working
请参考以下网址:http: //www.coderanch.com/t/454501/vc/eclipse-exe-not-working
回答by GuerillaNerd
You can also get this error if you have a 64-bit jre and 32-bit eclipse, so just make sure your jre and eclipse build match up!
如果您有 64 位 jre 和 32 位 eclipse,您也可能会收到此错误,因此只需确保您的 jre 和 eclipse 构建匹配即可!
回答by vidur punj
Pre append the string in system variable PATH: "C:\Program Files\Java\jdk1.6.0_22\jre\bin;" Then every thing will work fine.
在系统变量 PATH 中预先附加字符串:“C:\Program Files\Java\jdk1.6.0_22\jre\bin;” 然后一切都会正常进行。
回答by Frozenice
I got the same problem When i Installed the java update 38.... resolved by uninstalling the update.
我在安装 java 更新 38 时遇到了同样的问题......通过卸载更新解决了。
回答by guest
Eclipse was able to locate the JRE however it failed to launch because the eclipse that I had downloaded was 32 bit and my jdk version was 64bit. I uninstalled 64bit jdk and installed 32bit. Eclipse launched successfully
Eclipse 能够找到 JRE,但是它无法启动,因为我下载的 Eclipse 是 32 位,而我的 jdk 版本是 64 位。我卸载了 64 位 jdk 并安装了 32 位。Eclipse 启动成功