Wednesday, October 22, 2008

Eclipse - Bringing Back Run Last Launched

If you upgraded to the Eclipse 3.4, you may have noticed that the shortcut key for Running the Last Launched does not work properly. In older versions of Eclipse, CTRL+F11 used to run the last launched application or Junit test. By default, in Eclipse 3.4, this is used to run the *.java file that currently has focus.

If you would like to change this functionality back, just follow these instructions:

1. Open Eclipse Preferences by Navigating to Window -> Preferences
2. Using the Tree, Navigate to Run/Debug -> Launching
3. Here you will find the group called Launch Operation
4. Choose the option that says Always launch the previously launched application

Enjoy and pay it forward!!!

14 comments:

Thies Edeling said...

Thanks! Was really missing ctrl-f11 :)

Belteshazzar Mouse said...

This is the one thing I always hated and seemed anti-intuitive about Eclipse - that whole last run thing. I always want to run the file that is in focus! I guess I can start using this feature now!

Anonymous said...

Belteshazzar Mouse, you could use the feature: Alt+Shift+x,j to run the file in focus. It was always in Eclipse :)

Unknown said...

Thanks for that. This has been annoying me for months, and I finally got around to Googling and your short and sweet post has just made my day.

simonmeaden said...

Thanks, it always annoys me when you upgrade and what you did before doesn't work on the new version.

Dániel Dékány said...

I just don't get why they changed the default behavior... Some say the new one is more intuitive. Sure, but unless you develop Hello World, you will hardly ever be in your Main class, so now Ctrl+F11 just does nothing but pops up an error window in the 98% of real world cases. So the new default is just highly unpractical...

Artem Russakovskii said...

Thank you! I thought they removed this option altogether but it's still there.

100% agreed with Daniel - last launched is what you want in larger apps.

Anonymous said...

Another belated thanks for making this post which surfaced quickly in Google.

I got back into Java development recently, and was puzzled by the change. I love being able to hit Ctrl+F11 to run the test suite after making some changes to another file.

Carlus Henry said...

Everyone,

Glad that this post has helped everyone so much...

Amir H. Bakhtiary said...

I think they've done this in a bid to push for a better development style, where each file has a test function for itself and you sort of do a bottom up, test driven, development.

Amir H. Bakhtiary said...

Oh and nice post. Thanx.

Vtn said...

Very useful, thx!

Javin @ Basic Tutorials on FIX Protocol said...

I have also compiled list of useful eclipse shortcut which is very important to learn and adopt to work proficiently in eclipse.

Anonymous said...

Wow thanks for this one!