Class CmdShell


  • public class CmdShell
    extends Shell
    Implementation to call the CMD Shell present on Windows.
    Author:
    Carlos Sanchez
    • Constructor Detail

      • CmdShell

        public CmdShell()
        Create an instance of CmdShell.
    • Method Detail

      • quoteOneItem

        protected java.lang.String quoteOneItem​(java.lang.String inputString,
                                                boolean isExecutable)
        Quotes an item that contains a character cmd.exe would otherwise interpret: whitespace and the special characters listed above, or every item when Shell.isUnconditionalQuoting() is set. An item that is already surrounded by double quotes is left as it is.
        Overrides:
        quoteOneItem in class Shell
        Parameters:
        inputString - the executable or argument
        isExecutable - unused, the executable and the arguments are quoted the same way
        Returns:
        the item, surrounded by double quotes when cmd.exe needs them
      • getCommandLine

        public java.util.List<java.lang.String> getCommandLine​(java.lang.String executable,
                                                               java.lang.String... arguments)