Nathan Meyers wrote:
>
> On Thu, Sep 06, 2001 at 10:14:18AM -0400, Jesse Stockall wrote:
> > How can I get the pid of the jvm that an app is running in?
>
> You want to get it from within the app? PIDs are a non-portable concept,
> so you'll need a JNI call to get it (just wrap a JNI call around the
> getpid() system call). But there's a big caveat here: in Linux, every
> thread has its own PID, unless you're running with green threads. Your
> call to getpid() will get a pid somewhere in the process hierarchy,
> but probably not the one you want.
>
> Nathan Meyers
> [EMAIL PROTECTED]
http://www.cs.columbia.edu/~akonstan/javaps/javaps
-- Levente "Si vis pacem para bellum!"
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]