views:

68

answers:

2

Ctrl+F11 is the "Run" keyboard shortcut in Eclipse.

But for me, that only works if a Main class is active in the editor. For any of the other 100+ java files in my workspace, eclipse pops up a dialog, complaining "Editor does not contain a main type".

This makes the Ctrl+F11 shortcut nearly useless. I either have to press Ctrl+Alt+T, name of main class, Ctrl + F11, or use the mouse.

Do I have something misconfigured? What can I do to make Ctrl+F11 really run my program, no matter which file is active in the editor? Or is everybody using the Ctrl+F11 shortcut like that?

edit: I'm using eclipse 3.5.0

+2  A: 
JesperE
+1  A: 

Check the preferences, Launching section - you may want to switch from "aunch selection" to "launch previously launched application".

vwegert