Howto find out Process ID from java in linux
2009. 4. 12.
The following stuff works on Linux with JDK1.2 for getting the process id (and that of the parent). Steps to do: javac unistd.java javah -jni -o j_unistd.h unistd JHOME=/usr/lib/jdk1.2.2 gcc -shared -I. -I"$JHOME"/include -I"$JHOME"/include/linux j_unistd.c -o libj_unistd.so export LD_LIBRARY_PATH=. java unistd And the sources (the header is generated by javah) unistd.java import java.util.Prope..