In the last chapter, we explored the Process class and the java.lang.ProcessHandle API. In earlier versions of Java, process management from within Java required OS-specific implementations and was less than optimal in terms of CPU use and coding practice. The modern API, with new classes such as ProcessHandle, makes it possible to handle almost all aspects of process management. Specifically, we covered an introduction to processes, working with the ProcessHandle interface, and reviewed a sample process controller application.
In this chapter, we will focus on Java's StackWalker API. The API supports special functionality that is rarely needed by ordinary programs. The API can be useful for some very special cases, such as with functionality that is delivered by a framework. So, if you want an efficient means of stack walking that gives you filterable...