Question

I have an Eclipse project where I often launch the same java class. I have added my run configuration to the favorites menu, but to launch it I still need to click on the run-drop-down menu and click the icon - is there any way to associate a shortcut to this? When I searched for it I got lost in all the plugins & other things which seemed to be not so simple.

edit: Let me clarify, I want something I can type the moment I start eclipse, regardless of what page I'm viewing, so no "run last" or "run current"; I want F12 to link to "launch foo.bar.MainClass".

Was it helpful?

Solution

You should put in a feature request in the eclipse bug tracker (or vote up an existing equivalent feature request) or code it yourself.

OTHER TIPS

  • Open the workspace preferences by the menu: Window > Preferences
  • Select from the tree: Run/Debug > Launching
  • Now the Launching preferences are seen.
  • At the bottom there is Launch Operation
  • Use the option Always launch the previously launched application

You can configure your launch behaviour so Ctrl-F11 will launch the last launched application again, regardless of your current editor selection.

Look at "Run/Debug" - "Launching" within the eclipse preferences.

Just use Ctrl + F11. (This is the standard keyboard shortcut to run the class you are working on)

I wish this is what you are looking for... buddy.

alt+shift+x+J Rocks

I cannot this the answer here but : CTRL+SHIFT+T do apparently exactly what you want! :) Maybe it's because you code it by yourself by time...

Watch here: http://eclipse.dzone.com/news/effective-eclipse-shortcut-key for more.

If you've added these classes to your favorite run configurations (available from the run/debug toolbar buttons as "Organize Favorites..."), then the shortcut key combo is Alt+R,T,1 to run your first favorite, Alt+R,T,2 to run your second, etc. Alt+R,H,# works for debug configs.

I faced this problem in eclipse too. I have customized the configuration for me.

Windows -> preferances -> keys

Search for your configuration eg "Run Java Application" or just look for its icon.

Select it

and below in the binding field press keyboard keys which you want to add a shortcut for this configuration eg. ctrl + shift + T

and Apply

You are good to go use the same shortcut keys to whenever you need it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top