1

Actual Duplicate: How to stop a maven project started in Netbeans (That's mine after I figured out how to solve it properly)

My initial problem is that I want to detect a program stop from Netbeans. That doesn't work with the expected functions, not with Shudtdown Hooks or finalizer (compare).

The only difference I've noticed is that when I hit the stop button in Netbeans, the output window doesn't display the output of the program anymore. So I assume that the Reader for the Standard Out disconnected.

Therefore I want to notice the situation where there is nowhere the text is going.

I fear "No" is the answer as I could not find anything about it.

I tried the solutions in Shutdown hook doesn't work in Eclipse but they don't work. NetBeans doesn't have a process that I could override (except of course by changing the NetBeans code) and the System Property that is set by Eclipse is (obviously) not set in Netbeans. Also, I have no input into the Netbeans console, so that won't work either.

I should have mentioned that its a maven project, that could change some things.

Angelo Fuchs
  • 9,825
  • 1
  • 35
  • 72
  • [id guess its no](https://stackoverflow.com/questions/20054471/how-to-detect-program-java-force-to-close-from-windows-task-manager), yet it depends on how netbeans kills the process. [reference to eclipse](https://stackoverflow.com/questions/12836551/shutdown-hook-doesnt-work-in-eclipse). Possible duplicate of [Shutdown hook doesn't work in Eclipse](https://stackoverflow.com/questions/12836551/shutdown-hook-doesnt-work-in-eclipse) – XtremeBaumer Jul 19 '17 at 09:48
  • @XtremeBaumer I figured my primary problem: https://stackoverflow.com/questions/45188534/how-to-stop-a-maven-project-started-in-netbeans – Angelo Fuchs Jul 19 '17 at 10:59

0 Answers0