How to get carriage return without line feed effect in Eclipse console?

Dims picture Dims · Feb 9, 2013 · Viewed 14.6k times · Source

If I

System.out.print("something\r");

at console, I have cursor back at the beginning of line, and finally after

System.out.print("something\r");
System.out.print(" any\r");

I have

 anything

typed.

But at Eclipse console I get

something
 anything

as if it treated \r as CR/LF.

How can I setup this?

Answer

poitroae picture poitroae · Mar 8, 2013

As Nishant already pointed out in the comments, you've found a bug here.

This bug initially was reported in 2004 (>9 years ago!?!!) and this bug seems not to be fixed very soon (or ever). I tested it on several Eclipse version, even on Eclipse Juno SR2, and the bug is still there.