How to run Java .jar without MANIFEST.MF?

后端 未结 4 1076
我寻月下人不归
我寻月下人不归 2021-02-07 01:33

Is it possible to run a Java app which doesn\'t contain MANIFEST.MF file? Of course, there\'s static main method,just lacks manifest file. And the app

4条回答
  •  忘了有多久
    2021-02-07 02:04

    You can also add the manifest, with the following command:

    jar  -uvfe  your.jar foo.bar.Baz
    java -jar your.jar        # tries to run main in foo.bar.Baz
    

提交回复
热议问题