title: Java api for mac environment
body: <p>I’m wondering if there are native java api (jars) for mac that allows to get details on a process that opened a socket to my process.</p>
  
  <p>The scenario:</p>
  
  <ol>
  <li>I’m running my process (a daemon) on the same machine as the process that I need to get details on.</li>
  <li>I have the details of the socket of the remote process that opened a connection to me.</li>
  <li>I want to get the pid and the client binary (jar run by JVM, regular OS binary and others) information, such as:
  a. PID
  b. Path
  c. OS user running the process.</li>
  </ol>
  
  <p>I can perform this action by lsof but I prefer to use a Java solution. </p>
  
  <p>Added: I know that other vendors created specific Java libraries for specific platforms. </p>
  
  <p>Thanks!</p>