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

前端 未结 13 1416
日久生厌
日久生厌 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:52

    Double-clicking a jar opens it with whatever application you've associated to it in your OS. By default, javaw[.exe] is normally associated to jar files. That's the binary that runs without a terminal window. To see a terminal on double-click, you'd need to associate the java[.exe] binary with jar files.

提交回复
热议问题