Creating Jar with Intellij 2016 - No main manifest attribute

后端 未结 10 1712
清歌不尽
清歌不尽 2021-01-30 16:03

I am getting no main manifest attribute while running the jar create by Intellij. I extracted the jar and observed that there was another manifest

10条回答
  •  别那么骄傲
    2021-01-30 16:48

    In my case I had some dependencies added in my jar, which itself generated a Manifest. I didn't get it to work straight out of Intellij. However, what you can do is open the jar file with a zip program and add the Main class yourself and then copy it back into the jar:

提交回复
热议问题