Executing a jar on mac 10.8

前端 未结 3 1482
再見小時候
再見小時候 2020-12-10 03:30

Although this seems like a rather obvious question, I couldn\'t find the answer anywhere online.

After I create the jar file, I can run it successfully using the com

3条回答
  •  一个人的身影
    2020-12-10 04:27

    I would create a shell script to enclose it in terminal:

    #!/bin/bash
    java -jar yourjarfile.jar
    read -p 'Hit [Enter] to continue...'
    

    I added pause, but unless your java application is immediately reaching termination, it shouldn't be necessary (you can stop the shell script after the "java" line).

提交回复
热议问题