I have a program without a GUI and I use console! So first I read a line from a user from console
BufferedReader userReader = new BufferedReader(new
Making an executable jar is the same no matter GUI or not. You need to specify your Main-Class in your META-INF/MANIFEST.MF. See here and and here
Of course, if you want to start something on the console, just open the console and use the following: java -jar archive.jar (with the above requirements met)
Then I'd recommend using java.io.Console for reading and writing to the console.