Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

java

eclipse

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 file are under

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

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

can someone tell me how to fix this ??

like image 238
steven Yu Avatar asked Jan 23 '15 18:01

steven Yu


People also ask

Could not find main class program will exit?

Problem: Error "Could not find the main class - program will exit" on the ServiceDesk configuration while configuring Web Services. Cause: This happens when there are multiple java versions installed and the value of NtfsDisable8dot3NameCreation is incorrectly set.


3 Answers

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

Failed to find a Main Class in ... 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.

To rectify it, I added the below lines in the eclipse.ini file before -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.

like image 91
Maverick Avatar answered Oct 16 '22 13:10

Maverick


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

like image 39
sberezin Avatar answered Oct 16 '22 12:10

sberezin


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.!!

like image 2
Deepak Madhaan Avatar answered Oct 16 '22 11:10

Deepak Madhaan