I am using the following program (taken from an issue of the Core
Java tech tips) to run a native command/app and display its output to standard out:
the strange problem that I am running into is that when I use the above program to run the "ipconfig" command on Windows XP, the output from ipconfig has extra lines in it.
This is immediately obvious if I run the ipconfig command separately myself in a command prompt window. What's stranger yet is that it only appears to be happening with the "ipconfig" command/app. If I run any other Windows command using DoRuntime, the output from the command execution is OK and there are no extra lines in it.
Any ideas on why I am getting extra newlines when running ipconfig using Runtime.exec() or ProcessBuilder?
Thanks!