Creating Jar with Intellij 2016 - No main manifest attribute

后端 未结 10 2001
清歌不尽
清歌不尽 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:43

    For Idea Intellij 2020:

    1. Remove obfuscation if presents

    2. delete/(move somewhere outside the project) META-INF folder in explorer

    3. remove artifacts in project structure--> artifacts--> '-'

    4. rebuild the project

    5. add artifacts again to project structure--> artifacts--> '+'

    6. rebuild the project

    7. Build-->Build artifacts..

    Now the new produced jar should work

提交回复
热议问题