Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run as java application option disabled in eclipse [closed]

Tags:

java

eclipse

I had started working on Eclipse IDe 3.6. I had written a normal java program and when I tried running it(right click/run), am unable to find the 'run as java application' option. What am I missing here(Setting up the run configuration ?). Please help !!

like image 770
Anuj Balan Avatar asked Aug 11 '11 13:08

Anuj Balan


People also ask

Why it is not showing run as java application in Eclipse?

Run As > Java Application wont show up if the class that you want to run does not contain the main method. Make sure that the class you trying to run has main defined in it. It did have. It is just that it didn't show the run as app.

Why I am not getting run on server option in Eclipse?

For me worked: Right click on project > Properties > Project Faces > change Configuration from "custom" to "Default configuration for Apache Tomcat v7. 0" > OK and then Run on Server option has appeared.

How do I change my java program to run in Eclipse?

right click on you project in project explorer,then choose run configuratin,in the "type filter text" text box type "java application" ,select it and choose prespective link on the right side. select Java Application in "Application Type/Launchers:" list box. Then select "Java" in "Run" drop down box. apply>ok.


1 Answers

Had the same problem. I apparently wrote the Main wrong:

public static void main(String[] args){

I missed the [] and that was the whole problem.

Check and recheck the Main function!

like image 76
guy Avatar answered Sep 17 '22 18:09

guy