Skip to content

Terminal Factory Configuration

jdillon edited this page Apr 7, 2012 · 11 revisions

JLine 2 uses a factory to create new terminals. The behavior of this factory is configurable.

Basic

Available terminal types:

  • Unix (optional ANSI support)
  • Windows (optional ANSI support)
  • Unsupported

By default the type will be determined automatically, however this doesn't always pick the right implementation. To configure the terminal type set the property:

jline.terminal=_type_

Where type is one of (ignoring case, except for implementation):

  • auto
  • unix
  • win
  • windows
  • none
  • off
  • false
  • class implementing jline.Terminal

The none, off and false values all configure an unsupported terminal type.

Advanced

In addition to the system property you can configure the factory programmatically calling:

jline.TerminalFactory.configure(String type)

New terminal types, internally referred to as flavors can also be managed with:

jline.TerminalFactory.registerFlavor(Flavor flavor, Class<? extends Terminal> type)
Clone this wiki locally