title: Java code - Best way to list java processes in localhost JVM (for Linux & Windows]
body: <p>I'm writing a console app that will run in Linux and Windows systems. This app will mainly run on JRE 1.8 environments.</p>
  <p>In my code, it needs to get a list of Java processes that run on the host running my application. I have read the posts about jps, which come as a part of JDK, but not JRE, and also it's a separate executable.</p>
  <p>My question is, is there any java library that I can use, to list (and ideally also kill some of) the running Java processes? Preferably, I would not want to hassle of calling jps executable with sth like Runtime.exec().</p>
  <p>Thanks in advance, for any suggestions.</p>