What's a good Java, curses-like, library for terminal applications?

JavaTerminalConsoleConsole ApplicationGnu Screen

Java Problem Overview


I would like to write a Java terminal application that does screen manipulation. Are there any good libraries out there that allow you to manipulate the screen like curses in the *nix/C world?

Minimal features I'm looking for are windowing and user input support.

In feature-speak, I'd like to have a region of the terminal where some data is regularly updated while (at the same time) the user can enter commands/text in some other part of the screen.

Java Solutions


Solution 1 - Java

Lanterna

I found the Lanterna library recently. Haven't had the opportunity to use it yet but it looks like a more up-to-date alternative to the others.

enter image description here

Solution 2 - Java

There is Charva, which links to native code but has an api based on Swing. The screenshots show lots of text windows, so that looks useful.

Solution 3 - Java

Haven't used it myself, but Java Curses Library sounds like what you want.

Solution 4 - Java

Here is a way to call the ncurses lib using JNI. I tested this and it works.

Solution 5 - Java

As of 2013, the closest I can find is Blacken.

Blacken is not a curses library per-se. It moves away from the terminal, and instead, renders it's own "console window." This has the disadvantage of not looking "console-like." Instead, you get full (arbitrary) colour support, and a curses-like API (in addition to their main API).

You can also set the font to Mono for fixed-width characters.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionFrancisco CanedoView Question on Stackoverflow
Solution 1 - JavaBryceView Answer on Stackoverflow
Solution 2 - JavaBart SchullerView Answer on Stackoverflow
Solution 3 - JavaJim BlizardView Answer on Stackoverflow
Solution 4 - JavaDMKingView Answer on Stackoverflow
Solution 5 - Javaashes999View Answer on Stackoverflow