If you just wanted an easier way for end users to run your app without typing into cmd (instead of needing 2 windows), just ship an executable batch file with your jar.
Type: Posts; User: newbie
If you just wanted an easier way for end users to run your app without typing into cmd (instead of needing 2 windows), just ship an executable batch file with your jar.
If that was directed at me, i think it was done using System.setOut(new PrintStream()) etc but using PipedOutputStream and an extra thread. The inputstream element was never added, as it simply comes...
I've got a weird but plausable approach for you! I found one of my earliest Swing applications from University a few years back which simulates a command prompt in Swing. Its appearance can be seen...
While the Process is alive, the hooks to both streams do refer to opened process. In the past, I've used the input streams to read values returned by .exe files.
--- Update ---
...
Okay, how about .setOut(new PrintStream(getStream))?
As I'm running Linux at the moment, I can't test anything. That said, my assumption would be to try something like:
public static void main(String args[]) {
final String[] params = {"cmd.exe",...