Creating Jar with Intellij 2016 - No main manifest attribute

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

    I spent a few days to resolve it. My solution: I loaded a project that present in this answer. Then I compared and corrected settings of the loaded project and my own project. I compared/corrected:

    • Run/Debug Configurations
    • MANIFEST.MF
    • in Progect Structure settings: Project, Modules (mark what is sources, resources and etc), Artifacts.

    In the end, I placed META-INF in resources directory.

    Maybe i did excess actions, but it worked for me :)

    P.S. also need to choose "Inherit project compile output path" in Progect Structure settings -> Modules -> Path

提交回复
热议问题