4 ms·
Thread ID != process ID. Java 9 has introduced an API to get the process ID but before that, there was no defined way to get it, though it is accessible in a r
by kitd 8y ago
Thread ID != process ID.
Java 9 has introduced an API to get the process ID but before that, there was no defined way to get it, though it is accessible in a roundabout way via the JMX API, but even then it is not guaranteed. JNI would be another alternative.