Questions tagged [jansi]

Jansi is a small java library that allows you to use ANSI escape codes to format your console output which works even on windows.

Jansi is a small java library that allows you to use ANSI escape codes to format your console output which works even on windows.

See: https://github.com/fusesource/jansi

(description taken from the Github repository of Jansi).

17 questions
4
votes
1 answer

JLine3 "Unable to create a system terminal" after build

I just tried to implement JLine with Jansi, but it throws always the same UnsupportedOperationException referring to org.jline.terminal.impl.jansi.JansiSupportImpl#winSysTerminal. Inspecting this method there is only one simple if which decides on…
Felix Gaebler
  • 702
  • 4
  • 23
3
votes
1 answer

How can I use ANSI color output in the IntellIJ console (2019.3)?

I'm using a very nice Java text coloring library jansi which works perfectly when I run the my code from a DOS prompt or a LINUX terminal. Unfortunately most of the time I find myself running code from my IntellIJ IDE (2019.3) and the console…
Dan
  • 9,681
  • 14
  • 55
  • 70
2
votes
1 answer

What causes this jAnsi NoClassDefFoundError?

In my code i am using the jAnsi Libary. but it spits the following error: import org.fusesource.jansi.AnsiConsole; import org.fusesource.jansi.Ansi; public class SnakeGame { public static void main(String[] args) { …
2
votes
0 answers

from Java 11 on windows10, how best to detect if System.out is Ansi enabled

I am trying to use Logback with colour output if the System.out is Ansi enabled, using Groovy v3, java 11, on windows 10. I want to make my logback.groovy config switch the appender format string based on detecting whether the std out for my console…
WILLIAM WOODMAN
  • 1,185
  • 5
  • 19
  • 36
2
votes
1 answer

How to mask an input string in Spring-Shell

I am using Spring-Shell and I would like to mask the input when typing the password field for a particular method. Looking on the internet and here in the forum, I found many people suggesting to use the console.readPassword() command but, creating…
Daniele
  • 21
  • 3
1
vote
0 answers

mvn install stuck after some percentage while downloading jansi.jar file

I am running a Maven project for which I have a private remote repository using JFrog Artifactory that I have included in my Maven settings.xml file. All the dependencies are getting downloaded successfully but for one particular JAR i.e.…
Rajan Chauhan
  • 461
  • 2
  • 7
  • 18
1
vote
0 answers

Could not load library. Reasons: [no jansi in java.library.path

Hi Guys I recently got an error when I'm doing the "mvn clean install" for my project can someone help me, please!!! Here is the error I'm facing. Could not load library. Reasons: [no jansi in java.library.path, Native Library…
1
vote
1 answer

How do I clear the screen using Jansi?

I am trying to clear the console in Java using Jansi. I am using macOS, but Jansi should be portable. Here is the code that I have tried: AnsiConsole.systemInstall(); System.out.println("Hello...…
sdgfsdh
  • 33,689
  • 26
  • 132
  • 245
1
vote
3 answers

Kotlin Compiler build fail in Raspberrypi2

I tried to build kotlin compiler in Raspberrypi2 on Ubuntu Mate 15.10 When I execute ant -f update_dependencies.xml and during building, error occured below. override-version: [echo] Requested URL…
Kyungkoo
  • 11
  • 3
1
vote
1 answer

Jansi keeps incrementing indentation

I can't seem to get rid of previously printed lines. If I do just AnsiConsole.out.println(ansi); It repeats the same output every successive output. E.g. A AB ABC Even if the output is only supposed to be A B C My code…
Lexicographical
  • 501
  • 4
  • 16
0
votes
1 answer

Setting up a classpath for Jansi

I've been trying to use Jansi for the first time on a Java program, but I can't import org.fusesource.jansi.AnsiConsole and get an error saying that this package does not exist. I downloaded the latest Jansi version under C:\Users\Leonardo\Jansi…
0
votes
0 answers

org.fusesource.jansi#jansi;1.11: when running SBT in Windows command line & in IntelliJ tool

I am trying to use IntelliJ on a Windows 10 machine for Scala/SBT development. However I am receiving the below error every time I open a project with Scala/SBT: Error while importing sbt project: Getting org.fusesource.jansi jansi 1.11 ... ::…
0
votes
1 answer

Comparing strings not working, and empty list not empty

I am working on a little Server - Client program. The code I have here runs in a different program as well and works fine, but for some reason in this program does not. So when the user wants to login they type their Username and Password this…
parabolah
  • 65
  • 3
  • 11
0
votes
1 answer

How do I get ANSI bright colors to work in the windows cmd?

I am using java, the jline library and jansi. I have regular colors working just fine, either using \u001B[32m for example, or Ansi.ansi().fg(Ansi.Color.GREEN). However, I cannot seem to get the bright set of colors working. I've tried both…
MrZoraman
  • 421
  • 4
  • 13
0
votes
0 answers

Java - How to use ANSI in java

I am trying to send coloured messages in the console with ANSI. I added the jasni 1.9 to my jar and I tried to use the methods of ansi but that did not work. The second thing I have tried was to go to the jansi website but the website was down.…
Daan Meijer
  • 143
  • 2
  • 12
1
2