Interface ProcessBuilder

  • All Known Implementing Classes:
    ProcessBuilderImpl

    public interface ProcessBuilder
    Interface used to create new processes.
    • Method Detail

      • directory

        ProcessBuilder directory​(File dir)
        Specify the current directory to run the command from.
        Parameters:
        dir - The directory to run the command from.
        Returns:
        The ProcessBuilder instance.
      • start

        Process start()
               throws IOException
        Create and start the process.
        Returns:
        The process that has been started.
        Throws:
        IOException - If the process can not be created.
      • attach

        Process attach​(int pid)
                throws IOException
        Attach to an existing process.
        Parameters:
        pid - The process PID to attach.
        Returns:
        The process that has been attached.
        Throws:
        IOException - if the process can not be attached to.