If I use System.out.print("Hello World") and run it in my IDE, it prints to the IDE output. If I compile it into a .jar file and run it from the terminal (mac) then it will print to the terminal; But if I just double click it and it doesn't have a GUI then it will not print anywhere. Is there a way to make it print in a certain app/exe like the terminal?
example:
Runtime runTime = Runtime.getRuntime();
Process process;
process = runTime.exec("open -a terminal");
[some code here]
System.out.print("Hello World");
and it prints hello world into the terminal
extra info: I'm using OSX and my IDE of choice is netbeans
EDIT: I don't want to print to a file, I want to print specifically to the terminal so that I can still receive input