java - System.err.println() 不以红色打印

标签 java eclipse

System.err.println() 在 Eclipse 中不会以红色打印。

我检查了 preferences > Run/Debug > console

  • “标准错误文本颜色”为红色
  • 选中“程序写入标准错误时显示”。

知道为什么 Eclipse 不应该打印成红色吗?

最佳答案

据我所知,这似乎是一个 bug that has been fixed in Tomcat 7和以后。我不确定这是否是导致它的原因,但可能是:

Redirection of System.out and System.err in org.apache.catalina.startup.Catalina.start() prevents any other application (for instance an IDE) from redirecting System.out and System.err. It also redirects them to the same output (the standard system output stream) preventing any differentiation of the two streams.

关于java - System.err.println() 不以红色打印,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11240925/

相关文章:

eclipse - 错误 404 - 请求的资源在带有 tomcat 7 的 Eclipse 中不可用

java - Java 中透明且与操作系统无关的路径处理

java - Android Eclipse findViewByID 与以编程方式 CheckBox

java - 使用 Eclipse 的调试器理解 Java 递归

eclipse - 使用Gradle buildship Eclipse插件找不到调试选项

c++ - 无法在 Eclipse 中解析 C++ 的结构类型

java - JComboBox 的输出被打印两次

java - 静态实例上的模拟方法

java - 如何设置对象在JFrame 中的位置?

java - 需要使用selenium从多个网页捕获数据