Use Launch4j and in Basic Tab give your exe name in Output file and then load a jar file in Jar Tab. Go to Header Tab and select Console. It will ask you to save a xaml file just put some random name and click save. Finally your .exe is created and you can run now.
Open a terminal window. You can find this under Go -> Applications -> Utilities. Drag the Terminal to your dock since you will be using it frequently. To check that you are running the right version of Java, type the commands in boldface below.
Is there any way I can make an executable .jar that will open up the command line when double clicked?
I'm making a text-based adventure game. As of right now it is just a maze with rooms. Eventually it is going to be much bigger and more in depth but for now I just want to get the basic structure down. Anyways, to make this work I've been getting output and input from the System.out.printf command and the java.util.Scanner. It's all working beautifully so far but I've realized I'm going to run into a problem when I try to send this to other people that don't know how or just don't want to run the program from the command line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With