How do I make my java application open a console/terminal window?

前端 未结 13 1399
日久生厌
日久生厌 2020-12-28 21:12

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

13条回答
  •  盖世英雄少女心
    2020-12-28 21:43

    1. Use Launch4j and in Basic Tab give your exe name in Output file and then load a jar file in Jar Tab.
    2. Go to Header Tab and select Console.
    3. Then go to JRE tab and give the JRE version e.g 1.8.0
    4. Then click the build wrapper button (kind of setting icon)
    5. It will ask you to save a xaml file just put some random name and click save.
    6. Finally your .exe is created and you can run now.

提交回复
热议问题