How to create default debug and run configuration in Eclipse?

Maybe this article from Eclipse One Tips will help you:

How to run the last launched application

The answer lies in a preference hidden on the Run/Debug page:

  • Go to Window > Preferences > Run/Debug > Launching.
  • Select the option Always launch the previously launched application. It’s located at the bottom of the dialog.

The preference should look something like this:

Launch previously launched prefrences Now you’re free to press
F11, Ctrl+F11 or click the Run/Debug
icons on the toolbar with confidence, knowing it’s going to run what
you expect it to run.

One question arises: How do you quickly run a class as a specific
application (eg. a JUnit test) if you can’t press F11 to
run it? You have some options available:

  • The fastest way is to use keyboard shortcuts. Eclipse allows you to launch classes using a keystroke, including JUnit tests, Java
    applications, etc using Alt+Shift+X.
  • Alternatively, right-click on the class and select Run As. The submenu will show available options for launching the class.
  • Lastly, you could click the pulldown arrow on the run/debug icons in the toolbar and select Run As. The submenu once again shows
    available options for launching the class.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)