0

Seems easy enough to write console output to file, but doing so appears to hijack the output stream from the console. Is there a way to write to the console and a file simultaneously?

Cœur
  • 34,719
  • 24
  • 185
  • 251
the_prole
  • 7,471
  • 14
  • 64
  • 141
  • 2
    If you are on Linux/Unix or Mac OS, you can just pipe your program to the **tee** utility, that does exactly that ( http://man7.org/linux/man-pages/man1/tee.1.html ), with no need to modify the Java source. – FBergo May 07 '18 at 18:54
  • If you want to do it in Java, see the dupe. But tee is a fine solution. – Andy Turner May 07 '18 at 19:01

0 Answers0