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]
> Thanks
>
> --
> Jesse Stockall | Tel: 1+ 613.599.2441 ext. 243
> CRYPTOCard Corporation | Fax: 1+ 613.599.2442
> Suite 304, 300 March Rd. | email: [EMAIL PROTECTED]
> Ottawa, ON, Canada K2K 2E2 | web: www.cryptocard.com
> ---------------------------------------------------------------------
>
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>
--
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]