如果我
System.out.print("something\r");
在控制台,光标回到行首,最后在
System.out.print("something\r");
System.out.print(" any\r");
我有
anything
打字。
但是在 Eclipse 控制台我得到了
something
anything
好像它把 \r
当作 CR/LF。
我该如何设置?
最佳答案
正如 Nishant 在评论中已经指出的那样, you've found a bug 在这里。
这个错误最初是在 2004 年报告的(>9 年前!?!!),而且这个错误似乎不会很快修复(或永远不会)。我在几个 Eclipse 版本上进行了测试,甚至在 Eclipse Juno SR2 上也进行了测试,但 bug 仍然存在。
关于java - 如何在 Eclipse 控制台中获得没有换行效果的回车?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14792478/