0

When I create an executable .jar file using IntelliJ, the .jar file always ignores it's own class-path in the manifest.mf file.

Thanks to this question: Executable JAR ignores its own Class-Path attribute I have been able to find that the cause of the problem is that during the creation of the .jar file, a META-INF/LIST.MF file is created. If I delete that file, everything works fine. However, unlike the question linked, my pom.xml file does not contain the command to create this file.

How do I turn this off in IntelliJ?

Wige
  • 3,788
  • 8
  • 37
  • 58
  • https://stackoverflow.com/a/45169655/104891 may be the case. This file may come from one of the dependent jars included in the artifact. – CrazyCoder Apr 03 '18 at 18:59

1 Answers1

0

Try, when creating an artifact in IntelliJ,project structure -> Artifacts -> new from maven with dependencies, in the path for Directory for the META-INF/MANIFEST.MF, always change the path to the sibling resources directory, it should not be set tojava` directory.

Soheil Pourbafrani
  • 3,249
  • 3
  • 32
  • 69