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

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

    If you want full control, you can implement a Console window in Swing which does what you have now.

    If you cannot open said window (if headless) or the user asks for it on the command line, then just default to your current behaviour.

提交回复
热议问题