An urgent help is required. I need to display colored font in command prompt during execution of a java program on Windows Machine. I am unable to do so and while I searched for online help I came across JANSI library.
Is there any other way to print colored output in command prompt on Windows OS using Java ? If yes please respond as soon as possible
Cursory search yields some utilities on the web that add ANSI support to standard Windows consoles, but you'd still have to output proper ANSI codes. JANSI seems to do both for you, without the need to install third-party software on your machines.
The only other option I can think of would be to use JNI to call native Windows Console API functions. While it might provide some additional options over JANSI (like creating additional consoles, for example), it would definitely be much more difficult and complicated to use.
Java curses (jcurses) may be a way to go, and I don't mean just screaming at your Java program (though I also don't necessarily rule that out). The jcurses library gives quite a bit of control over the console window. However, it may be overkill for what you want.
subject: Coloured output in command prompt on windows using java