Previous Topic

Next Topic

Book Contents

Book Index

JLine Library

This document provides general information and describes how to fix command completion problems.

Overview

JLine is a Java library, which handles console input and has similar functionality as BSD editline and GNU readline. Most of the JLine command editing features will be familiar for people with some knowledge of modern shells readline/editline capabilities (like bash and tcsh). More info can be found in https://jline.github.io/.

It is important to have in mind, that JLine provides command completion, but unfortunately, it does not cope very well with Eclipse on Windows.

If this bundle is installed, and the framework is started inside Eclipse, the framework console will not work at all.

The reason is the JLine library, that is used internally. It correctly detects the Windows platform, but there is no way to detect that it is running inside Eclipse. And Eclipse console is not all similar to the Windows console, which is accessed using some native API.

In order to FIX the problem you can:

  1. Set environment variable TERM=dump when running the framework within Eclipse/Windows.
  2. Set the java system property jline.terminal=jline.UnsupportedTerminal.

The above will disable command completion and advanced console features. This in fact completely disables the benefits of using console.jline, but the workaround above at least enables some command-line input inside eclipse.

The problem does not occur on normal terminals. It is strictly observed only inside Eclipse console. However it might also occur on any other graphical console, that emulates the capabilities of the OS console. This means, that the problem may be observed on other Java IDEs too.