1

Is it possible to open a command line from Java application, meaning, I have a GUI (written in Java) and I want a command line window to open up (at a specific location) in some cases. is it possible to implement?

Thanks, Binyamin

MByD
  • 133,244
  • 25
  • 260
  • 270

1 Answers1

3

This works (revised solution):

String path = "c:\\";
Runtime.getRuntime().exec(new String[] { "cmd.exe", "/C", "\"start; cd "+path+"\"" });
dacwe
  • 42,413
  • 12
  • 112
  • 138