How do I get the id of my Java process?
I know there are several platform-dependent hacks, but I would prefer a more generic solution.
You can check out my project: JavaSysMon on GitHub. It provides process id and a bunch of other stuff (CPU usage, memory usage) cross-platform (presently Windows, Mac OSX, Linux and Solaris)