try ProcExe

This commit is contained in:
Doug MacEachern 2006-01-22 22:12:09 +00:00
parent 38e5a2ff35
commit 238045723a

View File

@ -88,10 +88,17 @@ public class ProcUtil {
name += ":" + className;
}
}
else {
if (args.length != 0) {
else if (args.length != 0) {
name = args[0];
}
else {
try {
String exe =
sigar.getProcExe(pid).getName();
if (exe.length() != 0) {
name = exe;
}
} catch (SigarException e) {}
}
return name;