Reputation: 116030
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.
Upvotes: 10
Views: 2991
Reputation: 1431
In Eclipse Neon go to Window -> Preferences -> Run/Debug -> Launching
and in the Launch Operation
section check:
[X] Terminate and Relaunch while launching
Upvotes: 4
Reputation: 22080
That's not possible with Eclipse built-in features. The easiest way to automate this seems to be
Upvotes: 1
Reputation: 16390
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.
Upvotes: 1