try {
DeployImageClassLoader loader = DeployImageClassLoader.
getInstance(toolDesc.getLocationType(),
toolDesc.getLocation(), getClass().getClassLoader());
Class c = loader.loadClass(toolClass);
tools[i] = new ToolWrapper(c, ctx);
logger.fine("Trying to run tool " + c.getName());
tools[i].configure(toolNames[i], path, outDir, host, CmdAgentImpl.getHandle(), latch);
} catch (ClassNotFoundException ce) {
logger.log(Level.WARNING, "Class " + toolClass + " not found");
latch.countDown();
} catch (Exception ie) {
logger.log(Level.WARNING, "Error in creating tool object " +
toolClass, ie);
latch.countDown(); // Tool did not get started.
}
} else if (!"default".equals(ctx.getToolId()) ||
(ctx.getToolParams() != null &&
ctx.getToolParams().trim().length() > 0)) {
try {
tools[i] = new ToolWrapper(CommandLineTool.class, ctx);
tools[i].configure(toolNames[i], path, outDir, host, CmdAgentImpl.getHandle(), latch);
logger.fine("Trying to run tool " + tools[i] + " using CommandLineTool.");
} catch (Exception ex) {
logger.log(Level.WARNING, "Cannot start CommandLineTool!", ex);
latch.countDown();