Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Close Java app before each run in Eclipse

I wish the run command (usually default to CTRL+F11 combination) of a Java project (and C++ if you know it too) to automatically close the previous process (or all processes, if it's easier) started by it before it runs a new instance.

In short, running a project should also close previous app instance. Is it possible?

Maybe it's possible to add code to the app itself, and disable it once I don't need it anymore? I want it since it's annoying to close the app each time. I don't need so many instances of the app.

like image 249
android developer Avatar asked Oct 01 '12 22:10

android developer


2 Answers

In Eclipse Neon go to Window -> Preferences -> Run/Debug -> Launching and in the Launch Operation section check:

[X] Terminate and Relaunch while launching

Terminate and Relaunch while launching

like image 105
Robert Mikes Avatar answered Sep 20 '22 15:09

Robert Mikes


Easier said than done. I suggest you terminate the process yourself by clicking on the little red stop icon in the console or by terminating the main thread from the threads view in the debugger perspective.

like image 36
Chris Gerken Avatar answered Sep 21 '22 15:09

Chris Gerken