2

When I start a process without a GUI in Java, no console (cmd.exe) window is opened.

Example:

ProcessBuilder builder = new ProcessBuilder("process", nogui);
Process process = builder.start();

How can I see the console window?

tly
  • 1,202
  • 14
  • 17

1 Answers1

1

For Windows

Process proc = Runtime.getRuntime().exec("cmd /c process nogui");

For Other OS; Similar :)

  • thx for the answer :) , but it doesnt work :(, the process is in the list in the taskmgr (its java.exe), but the window isnt visible... – tly Jan 18 '12 at 20:56