title: Java - get PID of external process by command line in Windows 7
body: <p>I have Windows 7 32 bit with Java: </p>
  
  <p>How do I get the PID of a process by command line in Windows 7?</p>
  
  <p>I want to kill an application which I only can truly identify by the command line which ran it.  We have several Java applications running on that machine. I need to stop specific ones. </p>
  
  <p>To be exact: I need to find tomcat which is run by <code>catalina.bat</code>.  What do you think is the best way to do this?</p>
  
  <p>I know of tasklist, but it does not seem to be able to query the command line which started the process.  Finding <code>java.exe</code> does not help me.  I tried searching for something useful like pgrep/pkill for Windows, with no success.</p>