🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.java
Article #573

How to get access to the Windows PID assigned to a ("java.exe") application

#573
From: Fran Maurais
Date: Fri, 09 Jun 2006 14:57
16 lines
2142 bytes
Is there a simple way for a Java application to display/log the Windows PID 
that has been assigned to it?  I'm running on both Win2K and WinXP.

I have several Java apps, which all run in their own VM.  They are started 
in separate DOS command windows via a visual basic script.  If I look in 
Windows Task Manager, I see XX number of "java.exe" processes, but currently 
find it hard to identify which is which...

I expect this startup procedure will change in the future....however in the 
short term, is there a way that each application can print/log its PID to 
the console...i.e. perhaps using a System.* or Runtime.* method call? 
(adding to the command window's title bar would be even better)...

Thanks,

F. Maurais
Technical Details
Message-ID: <M%fig.40894$4L1.24950@newssvr11.news.prodigy.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newsdst02.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr11.news.prodigy.com.POSTED!623bbae4!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: fcba0,957c809aa543a79,start
X-Google-Thread: 111f0d,957c809aa543a79,start
X-Google-Attributes: gidfcba0,gid111f0d,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newsdst02.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr11.news.prodigy.com.POSTED!623bbae4!not-for-mail
From: "Fran Maurais" <fmaurais@snet.net>
Newsgroups: comp.lang.java,alt.comp.lang.java,codewarrior.java
Subject: How to get access to the Windows PID assigned to a ("java.exe") application
Lines: 18
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-RFC2646: Format=Flowed; Original
Message-ID: <M%fig.40894$4L1.24950@newssvr11.news.prodigy.com>
NNTP-Posting-Host: 64.252.3.213
X-Complaints-To: abuse@prodigy.net
X-Trace: newssvr11.news.prodigy.com 1149865068 ST000 64.252.3.213 (Fri, 09 Jun 2006 10:57:48 EDT)
NNTP-Posting-Date: Fri, 09 Jun 2006 10:57:48 EDT
Organization: SBC http://yahoo.sbc.com
X-UserInfo1: TSUGG]SDTJSWSVLX]BCBNQ@@AZOZ@GXOXR]ZMVMHQAVTUZ]CLNTCPFK[WDXDHV[K^FCGJCJLPF_D_NCC@FUG^Q\DINVAXSLIFXYJSSCCALP@PB@\OS@BITWAH\CQZKJMMD^SJA^NXA\GVLSRBD^M_NW_F[YLVTWIGAXAQBOATKBBQRXECDFDMQ\DZFUE@\JM
Date: Fri, 09 Jun 2006 14:57:48 GMT