/** Returns the system specific file.separator delimited path to the asadmin script. Any changes to file layout should * be reflected here. The path will contain '/' as the separator character, regardless of operating * platform. Never returns a null. Assumes the the property "INSTALL_ROOT_PROPERTY" is set in the VM * before calling this. As of now (September 2005) all the server instances and asadmin VM itself has * this property set. The method does not guarantee that the script exists on the given system. It should * only be used when caller wants to know the location of the script. Caller should make sure it exists. * @return String representing the Path to asadmin script. Might return a string beginning with "null", if * the INSTALL_ROOT_PROPERTY is not defined */ public static final String getAsAdminScriptLocation() { return getAsAdminScriptLocation(System.getProperty(SystemPropertyConstants.INSTALL_ROOT_PROPERTY)); }
public LocalAdminCommand(String command, String... args) { asadmin = new File(SystemPropertyConstants.getAsAdminScriptLocation()); cmds.add(asadmin.getAbsolutePath()); cmds.add(command); if (args != null && args.length > 0) cmds.addAll(Arrays.asList(args)); }
public LocalAdminCommand(String command, String... args) { asadmin = new File(SystemPropertyConstants.getAsAdminScriptLocation()); cmds.add(asadmin.getAbsolutePath()); cmds.add(command); if (args != null && args.length > 0) cmds.addAll(Arrays.asList(args)); }
public LocalAdminCommand(String command, String... args) { asadmin = new File(SystemPropertyConstants.getAsAdminScriptLocation()); cmds.add(asadmin.getAbsolutePath()); cmds.add(command); if (args != null && args.length > 0) cmds.addAll(Arrays.asList(args)); }
private void setAsadmin() { String s = SystemPropertyConstants.getAsAdminScriptLocation(); if (!StringUtils.ok(s)) throw new RuntimeException( Strings.get("internal.error", "Can't get Asadmin script location")); asadminScript = SmartFile.sanitize(new File(s)); if (!asadminScript.isFile()) { throw new RuntimeException( Strings.get("noAsadminScript", asadminScript)); } } // set at construction-time
private void validateAsadmin() throws CommandException { String s = SystemPropertyConstants.getAsAdminScriptLocation(); if (!ok(s)) throw new CommandException( strings.get("internal.error", "Can't get Asadmin script location")); asadminScript = SmartFile.sanitize(new File(s)); if (!asadminScript.isFile()) { throw new CommandException( strings.get("create.service.noAsadminScript", asadminScript)); } }
private void validateAsadmin() throws CommandException { String s = SystemPropertyConstants.getAsAdminScriptLocation(); if (!ok(s)) throw new CommandException( strings.get("internal.error", "Can't get Asadmin script location")); asadminScript = SmartFile.sanitize(new File(s)); if (!asadminScript.isFile()) { throw new CommandException( strings.get("create.service.noAsadminScript", asadminScript)); } }
File asadmin = new File(SystemPropertyConstants.getAsAdminScriptLocation(installDir)); fullcommand.add(asadmin.getAbsolutePath());
File asadmin = new File(SystemPropertyConstants.getAsAdminScriptLocation(installDir)); fullcommand.add(asadmin.getAbsolutePath());
File asadmin = new File(SystemPropertyConstants.getAsAdminScriptLocation(installDir)); fullcommand.add(asadmin.getAbsolutePath()); fullcommand.addAll(args);
File asadmin = new File(SystemPropertyConstants.getAsAdminScriptLocation(installDir)); fullcommand.add(asadmin.getAbsolutePath());
File asadmin = new File(SystemPropertyConstants.getAsAdminScriptLocation(installDir)); fullcommand.add(asadmin.getAbsolutePath());