java.lang.System.out and java.lang.System.in are I / O streams for accessing the console. Java will not create a "console", but allows you to interact with the input / output streams provided by the operating system.
When you run it from a jar file (for example, by clicking on it from a folder), you will get GUI I / O streams that are not displayed anywhere.
Try creating a batch file with the java -jar command. When you run the batch file, you should see a command window. I guess the windows are here. Another way is to run cmd.exe directly with arguments that open the window, i.e. "Cmd.exe / c".
Kelly S. French
source share