Executes the command
validateOptions();
String addonJar = null;
try
{
addonJar = (String)operands.firstElement();
File addonJarFile = new File(addonJar);
if (addonJarFile.isFile() && addonJarFile.exists()) {
AddonControl ac = new AddonControl();
ac.install(addonJarFile);
} else {
throw new CommandException
(getLocalizedString("InvalidAddonFile", new Object[] {addonJar}));
}
}
catch (CommandException ce)
{
throw ce;
}
catch (Throwable t)
{
CLILogger.getInstance().printDetailMessage(t.getLocalizedMessage());
throw new CommandException(getLocalizedString("InstallAddonFailed",
new Object[] {addonJar}));
}
CLILogger.getInstance().printDetailMessage(getLocalizedString("InstallAddonCompleted",
new Object[] {addonJar}));