The returned name string can be any arbitrary string and a Java virtual machine
implementation can choose to embed ... Unfortunately there is no common JNA
API to get the current process ID yet, but each platform is pretty simple: ... process
id and a bunch of other stuff (CPU usage, memory usage) cross-platform (
presently Windows, Mac OSX, Linux and Solaris) ... Let your java code spawn a
server on a pre-defined port number and then execute OS commands to find out
the PID ...