Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Java error: This selection cannot be launched and there are no recent launches

Tags:

java

eclipse

I have looked everywhere on the internet and tried everything the forums say to do and nothing works. This error keeps coming up. I have tried running my java project (not for android) even the drop down run as button doesn't work because it says "none applicable".

like image 856
Joseph Marr Avatar asked Sep 15 '14 23:09

Joseph Marr


People also ask

How do you fix the selection Cannot be launched and there are no recent launches Eclipse?

Click on the drop down next to the Run button, After that choose Run Configuration, shows three option, for example i choose java application add class(Name of the class of your project) in that then Click on the ok button ... Run your application :) Save this answer.

Why Eclipse is not opening?

If you've "installed" Eclipse but are having trouble getting it to run, the most likely cause is that you have not correctly specified the JVM for it to run under. You may need to edit the eclipse. ini file. Another common mistake on Microsoft Windows is a mismatch between the "bittedness" of Eclipse and the JVM/JDK.


1 Answers

Eclipse needs to see a main method in one of your project's source files in order to determine what kind of project it is so that it can offer the proper run options:

public static void main(String[] args) 

Without that method signature (or with a malformed version of that method signature), the Run As menu item will not present any run options.

like image 161
MarsAtomic Avatar answered Oct 06 '22 04:10

MarsAtomic