如何在Eclipse控制台中得到没有换行符的回车? [英] How to get carriage return without line feed effect in Eclipse console?

查看:341
本文介绍了如何在Eclipse控制台中得到没有换行符的回车?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我

  System.out.print(something\r); 

在控制台,我有光标回到行的开始,最后在

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

我有

 code> any 

打字。



但是在Eclipse控制台我得到

 某事
任何
/ pre>

,就像将$ code> \r 作为CR / LF。



如何设置?

解决方案

正如Nishant在评论中已经指出的那样, 你在这里发现了一个错误



这个bug最初是在2004年发布的(> 9年前!?!!),这个bug似乎很难很快修复(或曾经)。我在几个Eclipse版本上进行了测试,甚至在Eclipse Juno SR2上也是这样,而且bug仍然存在。


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?

解决方案

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.

这篇关于如何在Eclipse控制台中得到没有换行符的回车?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆