Class ProcessBuilders


  • public final class ProcessBuilders
    extends Object
    Provides various utilities to use when working with the ProcessBuilder class.
    • Method Detail

      • builder

        public static ProcessBuilder builder​(List<String> args)
        Quotes command line args, performing proper escaping. This is necessary to workaround a bug on windows where arguments are not being property escaped.
        Parameters:
        args - the list of unquoted arguments
        Returns:
        a ProcessBuilder with the args quoted
      • quote

        public static List<String> quote​(List<String> args)
        Quotes command line args, performing proper escaping. This is necessary to workaround a bug on windows where arguments are not being property escaped.
        Parameters:
        args - the list of unquoted arguments
        Returns:
        the quoted arguments
      • quote

        public static String quote​(String arg)
        Quotes command a line argument, performing proper escaping. This is necessary to workaround a bug on windows where arguments are not being property escaped.
        Parameters:
        arg - the unquoted argument
        Returns:
        the quoted argument