Home > Articles > Programming > Java

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

FAQ 113: Where does System.out and System.err output go?

Most of the time, the answer is nowhere. Eclipse is simply a Java program, and it acts like any other Java program with respect to its output streams. When launched from a shell or command line, the output will generally go back to that shell. In Windows, the output will disappear completely if Eclipse is launched using the javaw.exe VM. When Eclipse is launched using java.exe, a shell window will be created for the output.

Because the output is usually lost, you should avoid using standard output or standard error in your plug-in. Instead, you can log error information by using the platform logging facility. Other forms of output should be written to a file, database, socket, or other persistent store. The only common use of standard output is for writing debugging information, when the application is in debug mode. Read up on the platform tracing facility for more information.

Note

FAQ 121 How do I use the platform logging facility?
FAQ 122 How do I use the platform debug tracing facility?

  • + Share This
  • 🔖 Save To Your Account