Is there a shortcut in Eclipse to Re-run the most recently launched program?

EclipseIde

Eclipse Problem Overview


One of the most frequent thing I do with Eclipse is to re-run the last program. I do it by going to Run -> Run History -> [top most item].

Is there a shortcut key that does this?

I know of CTRL + F11 but this does not work for me. It will launch the most recent program only if the currently active class (the class whose source code I am editing) does not have a main method. If it does it will use this class as the entry point for the program and not the one from the Run History list.

Eclipse Solutions


Solution 1 - Eclipse

For CTRL+F11 to work the way you want, you must set (from "Windows/Preferences") the
"Run/debug > Launching : Launch Operation" setting to:

> Always launch the previously launched application


As Thorbjørn Ravn Andersen mentions in the comment, launching the last app used to be (3.2 or before) the default behavior.
Since 3.3M6 (March 2007), As illustrated by this thread:

> By default, running and debugging applications has been simplified to run or debug the selected file or active editor.
When the selected resource (or active editor) is not executable, users can opt to launch the associated project or re-launch the previous launch.

> These settings are managed on the Run/Debug > Launching preference page.
Users can also revert to the 3.2 behavior of always launching the previous application.


Torsten confirms in the comments:

> Pressing F11 only launches the last application in debug mode.

Solution 2 - Eclipse

Run -> Run History -> [top most item] is just Alt + R + T + 1. But downside of this way is that Run menu must contain only one item with 'T' hot-key.

Solution 3 - Eclipse

Yes, Ctrl-F11.

Solution 4 - Eclipse

For Scala projects (Scala IDE) I had to also add this to avoid selecting a Scala lanucher every time:

  • Run/Debug > Launching > Default Launchers preference
  • in Launch Type/Mode select Scala Application
  • in Preferred Launcher select Scala Application (new debugger) Launcher

This also works for other launches that open a dialog when you press Ctrl+F11

Solution 5 - Eclipse

Ctrl+Shift+F9 stands for Relaunch with the same configuration.

This works out for me!

At least in Pydev-Editor. I'm not sure about the other perspectives...

Solution 6 - Eclipse

Ctrl-F11

And also you don't need to go to Run --> Run History. You can just click the small down arrow button next to the Run button (This looks like a green circle with a white play symbol in it) on your toolbar.

Solution 7 - Eclipse

Yes, Ctrl + F11 works in Windows and command + fn + F11 in Mac.

Solution 8 - Eclipse

Ctl + F11 did not work for me either (Neon on Lubuntu). I started doing this: Alt + r + t + 1

One could also use h instead of t to debug: Alt + r + h + #

I know it's a little longer but as long as I do not have to reach for the mouse and I can do it reliably on any Linux machine I am fine. Also, this way I can execute up to 9 previous runs by changing the number

Solution 9 - Eclipse

Way One:

Click the project from of this icon at this time hold the shift Button, Project will restart (Terminate and relaunch) with server port also.

enter image description here

Way Two:

enter image description here:

From of Eclipse Menu Bar: Windows => Preferences => Type and select keys type filter tex: terminate and relaunch Bind your Shortcut Key Like this:

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionItay MamanView Question on Stackoverflow
Solution 1 - EclipseVonCView Answer on Stackoverflow
Solution 2 - EclipseaeracodeView Answer on Stackoverflow
Solution 3 - EclipseBombeView Answer on Stackoverflow
Solution 4 - EclipseEran MedanView Answer on Stackoverflow
Solution 5 - EclipseMutaborView Answer on Stackoverflow
Solution 6 - EclipseSajal DuttaView Answer on Stackoverflow
Solution 7 - EclipseSam RajputView Answer on Stackoverflow
Solution 8 - EclipseObviousChildView Answer on Stackoverflow
Solution 9 - EclipseImranmadbarView Answer on Stackoverflow