I wanted to follow up on this one. I am still using Win32::Process to search for running instances of java.exe, but I now pass the found instance to a subroutine that uses the Win2000 utility tlist.exe to examine the information in detail. Let's say I find java.exe and PID is 1268, then my program runs this command:
tlist 1268
This returns all sorts of useful (and not!) information that lets me search for a meaningful reference in the CmdLine value. The java class file is listed there in my case. Below is the rough subroutine (not yet optimized to drop out of the loop when the answer is found) where tlist examines the PID passed. Thanks to all for your help!
sub CheckProcess {
foreach $_ (`tlist.exe $_[0]`) {
my $finder = index($_, "CIBFeeder");
if ($finder > -1) {
print "$_\n";
return 1;
}
}
return 0;
}