I hope this is the right topic for this.
Quick scenario. I have a class method that runs bat files. In the bat file, is a call to the
java compiler. If the bat file runs successfully it indicates success and dumps the screen response into a StringBuffer.
If it fails, it indicates that it failed and does the same thing.
I can get it to run successfully, so I know the success message works just fine. When I intentionally tried to break it (ie., changed the name of the file to be compiled to something that is nonexistant) to
test the failure message, instead of returning a failure message, it hung - I even let it run all night (had to go to bed anyway).
Is there a way to poll to see if the process is hung and then cancel it?
Thanks in advance.