create

fun create(command: List<String>, env: Map<String, String> = System.getenv(), workingDirectory: Path? = null, columns: Int = 80, rows: Int = 24): TerminalConnector

Creates a connector for a new local PTY process.

Callers should depend on TerminalConnector instead of PTY4J process classes.

Return

running terminal connector.

Parameters

command

command and arguments passed to the PTY child process.

env

environment variables for the child process.

workingDirectory

initial working directory, or null for platform default.

columns

initial terminal width in cells.

rows

initial terminal height in cells.

Throws

if the process cannot be started.