Sì, invece del "vero" System.in usare PipedInputStream/PipedOutputStream potrebbe essere una soluzione ma .... è molto delicata da trattare.
Infatti PipedInputStream/PipedOutputStream vanno usati da thread differenti e la documentazione lo dice chiaramente:
Typically, data is read from a PipedInputStream object by one thread and data is written to the corresponding PipedOutputStream by some other thread. Attempting to use both objects from a single thread is not recommended, as it may deadlock the thread.
Quindi: il piped output è usato nel contesto del Event Dispatch Thread ..... e il piped input in quale thread è usato? Insomma, in quale contesto fai quel s.nextLine() ?