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
  • 135,866
  • 28
  • 264
  • 277

1 Answers1

3

This works (revised solution):

String path = "c:\\";
Runtime.getRuntime().exec(new String[] { "cmd.exe", "/C", "\"start; cd "+path+"\"" });
dacwe
  • 43,066
  • 12
  • 116
  • 140