Avoiding display of Visual Studio Debugger when starting a new process from within java.exe
- by Matt Sheppard
How can I, from within a java program on windows, prevent a debugger window being displayed if a program I invoke crashes, and how can I detect the fact that it has crashed?
Background
I have a problem with a java application running on Windows which is launching an unreliable third party program by way of ProcessBuilder.start(). Specifically, if the external program crashes, the 'Visual Studio Just-In-time Debugger' window pops up asking if the user wants to debug the program.
From the java application side, I'm happy to deal with the fact that under some circumstances, the third party program will crash, but I'd like to be able to detect and silently handle that situation from within the Java code without requiring any user interaction.