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

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

    One way to accomplish this is to create a .bat file with the command: "java -jar filePath/yourfile.jar" (without ""). Make sure to include the file path or else your file won't be found. Though the question was answered already, this is a simple way to do it.

提交回复
热议问题