0

I am writing java program in eclipse, the program check condition and prints appropriate message as output. All i want to do is print output message in black color when condition is true and print message in red color when condition is false.

Is it possible to do so?

joragupra
  • 692
  • 1
  • 12
  • 23
DCoder
  • 3,486
  • 7
  • 36
  • 68
  • Perhaps with log4j. See [this](http://blog.uncommons.org/2006/04/09/colour-coded-console-logging-with-log4j/) link or specific to the Eclipse console see [this](http://stackoverflow.com/questions/7962748/colorize-log4j-logs-in-eclipse-and-netbeans-console) – radimpe Jan 03 '14 at 12:40
  • possible duplicate of [Colours in Java console](http://stackoverflow.com/questions/4846937/colours-in-java-console) - See also: http://stackoverflow.com/questions/7091003/show-system-out-println-output-with-another-color – assylias Jan 03 '14 at 12:42
  • or check this one if you just want colors in eclipse console: http://stackoverflow.com/questions/6286701/an-eclipse-console-view-that-respects-ansi-color-codes Otherwise there is a wikipedia article about ansi sequences http://en.wikipedia.org/wiki/ANSI_escape_code – KIC Jan 03 '14 at 12:46

1 Answers1

3

Use Grep console Plugin See here

Chandrayya G K
  • 8,719
  • 5
  • 40
  • 68