I should probably preface this answer with that fact that I have never launched a single process from a Java application before. However, a quick trip over to the API and I'm pretty sure I can safely say yes. The Process object, returned by Runtime.exec(), has a destory() method that appearently forcably terminates the process. That's a pretty ugly interview question, in my opinion. Is it common to be such a specific question in Java position interviews?
Is this even a Java question? is what I'm curious about, since process creation and handling is not a platform-independent discussion. When a parent dies, it may HUP dependent child processes; you may see this behavior when you close the window that launched your browser, taking the browser with it. nohup(1), when used to load a command, allows the resulting process to ignore the death of its parent and continue processing. ------------------ Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
Make visible what, without you, might perhaps never have been seen. - Robert Bresson
I believe it was more of an OS question. I know at least in Unix, if a parent process dies before the child completes execution the child becomes an orphan process and is adopted by the init process.( I think it has a PID of 1 ) Sagar
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com