“Invalid signature file” when attempting to run a .jar

后端 未结 21 2035
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-22 05:34

My java program is packaged in a jar file and makes use of an external jar library, bouncy castle. My code compiles fine, but running the jar leads to the following error:

21条回答
  •  遥遥无期
    2020-11-22 06:11

    I had this problem when using IntelliJ IDEA 14.01.

    I was able to fix it by:

    File->Project Structure->Add New (Artifacts)->jar->From Modules With Dependencies on the Create Jar From Module Window:

    Select you main class

    JAR File from Libraries Select copy to the output directory and link via manifest

提交回复
热议问题