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[])