Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

Set System.setOut(); to Command Prompt

$
0
0

I want to set output stream to the Command prompt like this:

Process p = Runtime.getRuntime()
          .exec("C:\\Windows\\System32\\cmd.exe /c start cls");

System.setOut(new PrintStream(p.getOutputStream()));

but it is not working, why ?


Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>