Ejemplo n.º 1
0
 private String[] parseArgs(String arguments) {
   if (arguments == null || arguments.trim().isEmpty()) {
     return NO_ARGS;
   }
   try {
     arguments = arguments.replace('\n', ' ').replace('\t', ' ');
     return CommandLineUtils.translateCommandline(arguments);
   } catch (Exception ex) {
     throw new IllegalArgumentException("Failed to parse arguments [" + arguments + "]", ex);
   }
 }
 private List<String> getJvmArgs() {
   List<String> extra = new ArrayList<String>();
   String userExtraJvmArgs = getExtraJvmArgs();
   if (userExtraJvmArgs != null) {
     try {
       return new ArrayList<String>(
           Arrays.asList(
               CommandLineUtils.translateCommandline(
                   StringUtils.removeDuplicateWhitespace(userExtraJvmArgs))));
     } catch (Exception e) {
       throw new RuntimeException(e);
     }
   }
   return extra;
 }