How to get platform independant PID using Groovy / Java 1.6

/ Published in: Java
Save to your folder(s)

Copy this code and paste it in your HTML
  1. import*
  3. final String name = ManagementFactory.getRuntimeMXBean().getName();
  4. final Integer pid = Integer.parseInt(name["@")-1])

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.