From 7cd022b29fed7fbfb30ccbecc7af1e1d9762ebf5 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Fri, 16 Jul 2004 15:49:02 +0000 Subject: [PATCH] dont allow missing jars to keep shell from starting --- bindings/java/src/net/hyperic/sigar/cmd/Shell.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bindings/java/src/net/hyperic/sigar/cmd/Shell.java b/bindings/java/src/net/hyperic/sigar/cmd/Shell.java index 81d57d9b..816f7489 100644 --- a/bindings/java/src/net/hyperic/sigar/cmd/Shell.java +++ b/bindings/java/src/net/hyperic/sigar/cmd/Shell.java @@ -51,7 +51,6 @@ public class Shell extends ShellBase { registerCommandHandler("penv", new ShowEnv(this)); registerCommandHandler("pfile", new ProcFileInfo(this)); registerCommandHandler("pmodules", new ProcModuleInfo(this)); - registerCommandHandler("ptql", new PTQL(this)); registerCommandHandler("cpuinfo", new CpuInfo(this)); registerCommandHandler("ifconfig", new Ifconfig(this)); registerCommandHandler("uptime", new Uptime(this)); @@ -59,7 +58,12 @@ public class Shell extends ShellBase { registerCommandHandler("kill", new Kill(this)); registerCommandHandler("netstat", new Netstat(this)); registerCommandHandler("version", new Version(this)); - registerCommandHandler("test", new SigarTestRunner(this)); + try { + //requires junit.jar + registerCommandHandler("test", new SigarTestRunner(this)); + //requires bcel-5.1.jar + registerCommandHandler("ptql", new PTQL(this)); + } catch (NoClassDefFoundError e) { } } public void processCommand(ShellCommandHandler handler, String args[])