Java: Coloring output in Windows

219 Views Asked by At

In a program I'm making, I really want to change the color of some words in my output. Thing is, the only solution I've found is Jansi, but honestly I'm very new to Github and this kind of projects and I have no idea about how to import it, or using it in my project.

So, is there any kind of alternative method to color some words in my Windows console? Or is Jansi my only option? In that case, can someone enlighten me about how to use it in my project?

Thanks in advance.

1

There are 1 best solutions below

0
On

As an easiest solution you can just copy Ansi.class from Jansi to your project.

See an example of usage here

But actually Socratic Phoenix is right. Better way is to add it as a jar library to your project.