This has been the cause of a royal lot of frustration.
I have two threads and a pipe between them. I want the first thread to send stdout to the second, and a pipe seemed like a convenient way to do this.
public PipedOutputStream p_stdout = new PipedOutputStream(); public PrintStream ps_stdout = new PrintStream(p_stdout, true); System.setOut(ps_stdout);
(I've made the appropriate imports, obviously.)
The compiler (Sun Java 184.108.40.206) hates that third line.
NetBeans complains in the following manner:
cannot find symbol symbol: class setOut location: class java.lang.System <identifier> expected cannot find symbol symbol: class ps_stdout location: class [my project name] <identifier> expected
Every example I've seen online uses an instantiation of PrintStream, not a class that extends it.
Thanks in advance,