Class ExecPty

java.lang.Object
org.jline.terminal.impl.AbstractPty
org.jline.terminal.impl.exec.ExecPty
All Implemented Interfaces:
Closeable, AutoCloseable, Pty

public class ExecPty extends AbstractPty implements Pty
A pseudoterminal implementation that uses external commands to interact with the terminal.

The ExecPty class provides a Pty implementation that uses external commands (such as stty, tput, etc.) to interact with the terminal. This approach allows JLine to work in environments where native libraries are not available or cannot be used, by relying on standard command-line utilities that are typically available on Unix-like systems.

This implementation executes external commands to perform operations such as:

  • Getting and setting terminal attributes
  • Getting and setting terminal size
  • Determining the current terminal device

The ExecPty is typically used as a fallback when more direct methods of terminal interaction (such as JNI or JNA) are not available. While it provides good compatibility, it may have higher overhead due to the need to spawn external processes for many operations.

See Also: