simulator/src/main/java/com/hazelcast/simulator/utils/NativeUtils.java
public static int getPID() {
        Integer pid = getPidFromManagementBean();
        if (pid != null) {
            return pid;
        }
        pid = getPidViaReflection();
        if (pid != null) {
            return pid;
        }
        return -1;
    }
public static int getPID() {
        Integer pid = getPidFromManagementBean();
        if (pid != null) {
            return pid;
        }
        pid = getPidViaReflection();
        if (pid != null) {
            return pid;
        }
        return -1;
    }
http://stackoverflow.com/questions/35842/how-can-a-java-program-get-its-own-process-id

@return the PID of this JVM or <tt>-1</tt> if not PID was retrieved