[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] How to make System.out.println(...) in color in Eclipse?

Hi,

My program prints out a lot of messages to console. I hope that in some conditions, the printing can be in red color so that I can be notified.

//regular printing messages

System.out.println("A lot of messages A");

if(specificCondition==true)
{
	System.out.println("You need to be careful about this");
	//System.err.println("You need to be careful about this");
}

System.out.println("A lot of messages B");

I know "System.err.println(...) shows up in red. However, the order of its message is un-predictable. e.g. "You need to be careful about this" may be shows up after "A lot of messages B" in console. And next run, the order will be different again.

Thank you for your help.