How to use JCurses in IntelliJ?

1.6k views Asked by At

I would like to use the JCurses Library with IntelliJ IDE but I have the following error message : "Error opening terminal: unknown."

My code :

import jcurses.system.*;
// Test Jcurses
Toolkit.init();

My Config :

  • VM Debian 8.7 64-bits with IntelliJ 2016.3.3 and JAVA Open JDK 64-bits 1.8
  • Lib directory with jcurses.jar and libcurses64.so

I don't find any documentation about the good way to do it.

Does anyone have an idea ?

1

There are 1 answers

2
CrazyCoder On

IntelliJ IDEA console tool window is not a real terminal.

There is a feature request to allow running in the external console. See also another related request.

At the moment you can configure the External Tool which will spawn a console and run your app there, but IDE integration will be not available for this console (however, you can still use Remote Debug).

Or you can use the Terminal tool window to run your app there manually. It would be handy to pack your app into an executable jar with all the dependencies. Then you will be able to run it like java -jar myapp.jar in the Terminal tool window or in the external terminal window.