vt100 escape codes are a powerful and popular method for formatting outputs (color, positioning, blinking, underlining etc.) on virtual terminals like xterm or konsole. See https://en.wikipedia.org/wiki/ANSI_escape_code
When you run a java program in xterm, konsole etc. and System.out.print
such codes - for example
// print "Hello, World!" in red
System.out.print("\u001b[31mHello, World!");
java passes them to the terminal unaltered, so these terminals interpret the codes then and behave as you expect them to.
Java programs are supposed to be platform independent, though, but when you run such a program from windows command prompt, you will see the codes printed out, like this:
☐[31mHello, World!
After searching for a way to solve this problem, I could not find a simple solution or even a discussion about the topic. Most solutions depend on running your program in a different console application or including a java-based custom console into your program.
So - how can you use vt100 formatted text in Windows default command prompt easily?