Reputation: 137272
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
Upvotes: 1
Views: 5029
Reputation: 43504
This works (revised solution):
String path = "c:\\";
Runtime.getRuntime().exec(new String[] { "cmd.exe", "/C", "\"start; cd "+path+"\"" });
Upvotes: 3