I am fairly new to Java and need your help. I am trying to change the color of the text in Eclipse console on run-time. I referred to one of the posts and tried to follow that. But the output shows a box of unicode escape character and the color of the text remains unchanged.
public static void main(String[] args)
{
System.out.println((char)27 + "[31mTest red color");
}
OUTPUT:
|00|
|1B| [31mTest red color
Notes:
- For output, I couldn't upload the image so i have typed [001B].
- The console uses UTF-8 encoding.
UPDATE Following the comment from Jarrod for possible duplication of the question, here is my update - The question is mainly for ANSI character not working and not for text color, so i have updated the question.