When I write a code in java in Eclipse and run it for second time, the first process is still running. When I, for example, write an infinite loop with some prints, run it once and then again, it is printing from both running, from the first and second. Plus, Eclipse is getting slow. Is there a way to auto-terminate the first process when re-run?
Share
You can right click on the entry in the Debug-View and choose “Terminate and Relaunch”, that is the closest I got to what you would like to have as it will first stop the currently running instance and then start a new one with the same settings.
Other from that you would probably implement something on your own, i.e. a socket where the instance listens and where the new one sends a shutdown command before it fully starts up.