Emilia con wrote:If I get a process object in Java through Runtime.getRuntime().exec(...), or ProcessBuilder.start(), I can wait for it through Process.waitFor(), which is like Thread.join(), or I could kill it with Process.destroy(), which is like the deprecated Thread.stop(). BUT: How do I find the pid of the Process Object? I don't see a method for doing that in The Official Documentation. Can I do this in Java? If so, how?
Sam Saha wrote:I have a log file which contains a big text lines. I wanted to keep the important lines and remove the unwanted lines from the big text file.
... ... ...
I wanted the output to be like this: