eclipse open error failed to find main class in eclipse\\plugins/org...jar

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28116257/
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 22:21:34  来源:igfitidea点击:

eclipse open error failed to find main class in eclipse\\plugins/org...jar

javaeclipse

提问by steven Yu

at the beginning it says that failed to find java jdk or jre so i installed it. then i run it again it came up this. It says that "Failed to find a Main Class in ... eclipse\\plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar"

一开始它说找不到java jdk或jre所以我安装了它。然后我再次运行它出现了这个。它说“ Failed to find a Main Class in ... eclipse\\plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar

java file are under

java文件在

C:\Program Files (x86)\Java\jre1.8.0_31 && jre7
C:\Program Files\Java\jdk1.8.0_31 && jre1.8.0_31

my eclipse file are under

我的 eclipse 文件在

D:\迅雷下载\操作系统\eclipse

can someone tell me how to fix this ??

有人可以告诉我如何解决这个问题吗??

采纳答案by sberezin

Try to move eclipseto some simpler path, like D:\development\eclipse

尝试将eclipse移动到一些更简单的路径,例如D:\development\eclipse

回答by Maverick

I was facing the similar issue where on launching eclipse photon it was giving error like:

我遇到了类似的问题,在启动 eclipse photon 时它给出了如下错误:

Failed to find a Main Class in ... eclipse\\plugins/org.eclipse.equinox.launcher*.jar

无法在 ... eclipse\\plugins/org.eclipse.equinox.launcher*.jar 中找到主类

One of the reasons in my case was that I had two JDK versions on my system (JDK 6 & JDK 8). It was running fine but stopped when I updated JAVA_HOME as JDK 6.

就我而言,原因之一是我的系统上有两个 JDK 版本(JDK 6 和 JDK 8)。它运行良好,但在我将 JAVA_HOME 更新为 JDK 6 时停止了。

To rectify it, I added the below lines in the eclipse.inifile before -vmargs:

为了纠正它,我eclipse.ini之前在文件中添加了以下几行-vmargs

-vm
C:/Program Files/Java/jdk1.8.0_111/bin/javaw.exe
-vmargs

Basically, I passed the JDK 8 path to the eclipse as required version for eclipse photon was Java 8. And this got me working.

基本上,我将 JDK 8 路径传递给 eclipse,因为 eclipse photon 所需的版本是 Java 8。这让我开始工作。

回答by KingsInnerSoul

I do not mean to steal the first answer - it did help me solve my very similar issue.

我并不是要窃取第一个答案 - 它确实帮助我解决了我非常相似的问题。

I am running Windows 8 x64 bit and installed a modded version of Eclipse in a custom path (rather the default install location that was suggested) - and I got that error.

我正在运行 Windows 8 x64 位并在自定义路径(而不是建议的默认安装位置)中安装了 Eclipse 的修改版本 - 我收到了那个错误。

So, I deleted that Eclipse install. Then installed both x86 and x64 versions of JDK(to their default install locations), and repeated the Eclipse install to the default install location - that solved the problem for me!!!

所以,我删除了那个 Eclipse 安装。然后安装了 x86 和 x64 版本的JDK(到它们的默认安装位置),并重复 Eclipse 安装到默认安装位置 - 这为我解决了问题!!!

The reason I installed both JDK versions was because I initially installed only the x64 bit version and a different error came. So I removed that Eclipse again, and repeated the JDK with both versions, etc...

我安装两个 JDK 版本的原因是因为我最初只安装了 x64 位版本并且出现了不同的错误。所以我再次删除了那个 Eclipse,并用两个版本重复了 JDK,等等......

回答by Chen10b

I was on this problem for like an hour and a half not getting that if you save the eclipse file in a non-English named folder it doesn't open.Hope it helps :)

我在这个问题上花了大约一个半小时没有解决这个问题,如果你将 eclipse 文件保存在一个非英语命名的文件夹中,它就不会打开。希望能帮助到你 :)

回答by Deepak Madhaan

This error is due to because you might have downgraded the version of java in your environmental variables.Try changing the java version in environmental variables and then run the sts or eclipse..for better practice restart the system.hope it helps.!!

这个错误是因为你可能已经降级了环境变量中的 java 版本。尝试更改环境变量中的 java 版本,然后运行 ​​sts 或 eclipse..为了更好的练习重新启动系统。希望它有帮助。!!

回答by Srikanth Josyula

This is issue might be because of the folder location or the JDK version, I installed the latest version JDK and with eclipse-inst-win64provided by eclipse i was able to install and run successfully

这个问题可能是因为文件夹位置或 JDK 版本,我安装了最新版本的 JDK 并且使用eclipse提供的 eclipse -inst-win64我能够成功安装和运行

回答by Sagar Sawant

Remove Eclipse from Non English folder if any.

如果有的话,从非英文文件夹中删除 Eclipse。