I am aware that you can pass commands to the Terminal and it returns your result in Java. The problem is for undisclosed reasons I need a Terminal window to open and to have the command in it. This code works to open an empty Terminal window (on mac):
p = Runtime.getRuntime().exec("/usr/bin/open -a Terminal");
And I have seen someone say on a different overflow question that you can do this:
p = Runtime.getRuntime().exec("/usr/bin/open -a Terminal [Put Command to pass through here]");
But it didn't seem to work when I tried to pass the command through to the window.
Any help or suggestions?