org.springframework.boot.loader.tools

Class RunProcess



  • public class RunProcess
    extends Object
    Utility used to run a process.
    Since:
    1.1.0
    Author:
    Phillip Webb, Dave Syer, Andy Wilkinson, Stephane Nicoll
    • Constructor Detail

      • RunProcess

        public RunProcess(String... command)
        Creates new RunProcess instance for the specified command.
        Parameters:
        command - the program to execute and its arguments
      • RunProcess

        public RunProcess(File workingDirectory,
                          String... command)
        Creates new RunProcess instance for the specified working directory and command.
        Parameters:
        workingDirectory - the working directory of the child process or null to run in the working directory of the current Java process
        command - the program to execute and its arguments
    • Method Detail

      • getRunningProcess

        public Process getRunningProcess()
        Return the running process.
        Returns:
        the process or null
      • handleSigInt

        public boolean handleSigInt()
        Return if the process was stopped.
        Returns:
        true if stopped
      • kill

        public void kill()
        Kill this process.
      • hasJustEnded

        public boolean hasJustEnded()