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 !!
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.
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.
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.
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With