Code Snippets, Programming
Snippet 0x02: Getting the Java process PID and managing PID files (Linux/Windows)
To the best of my knowledge, Java doesn’t offer a good way to get the OS-dependent PID of its own process. Sure, there are libraries to do that — but do you really want to add a heavy library for this simple task? Well I didn’t. Syncany already has so many dependencies, I don’t want to introduce a new one just for this simple task.
Recent Comments