🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7532

Re: Get program id from java

#7532
From: John McGrath TeamB
Date: Tue, 05 Jun 2001 07:32
22 lines
1649 bytes
On Tue, 05 Jun 2001 12:18:22 +0800, Russell wrote:

> Is there any ways to get the program id ??

There is no portable way to get the process id for a process you have 
created in Java.  This is because there is no guarantee that the host 
operating system even has a concept like a process id.

I suspect that it would be possible to get at the PID for a process, 
but the method would be very much platform dependant.  If you want to 
do that, use JBuilder's debugger to look at the Process object that is 
returned by the Runtime exec() method.  I am guessing you will find the 
PID in there.

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <MPG.158654718aa35dbb98a262@forums.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!news.boerde.de!dnews
References: <3B1C5D8E.36A4A8C4@cesmainternational.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,12a44754146f6396
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-06-05 00:41:43 PST
From: John McGrath  [TeamB] <ng-b@JPMcGrath.net>
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: Get program id from java
Date: Tue, 5 Jun 2001 03:32:51 -0400
Message-ID: <MPG.158654718aa35dbb98a262@forums.borland.com>
References: <3B1C5D8E.36A4A8C4@cesmainternational.com>
X-Newsreader: MicroPlanet Gravity v2.30
NNTP-Posting-Host: 209.92.40.60
X-Trace: dnews 991726369 209.92.40.60 (5 Jun 2001 00:32:49 -0700)
Lines: 22
X-Authenticated-User: jpmcgrath
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!news.boerde.de!dnews