0

I used IntelliJ to make a project and now I need an executable jar from it. I put a MANIFEST.MF file in src/main/resources/META-INF/MANIFEST.MF and it reads as follows:

Manifest-Version: 1.0
Main-Class: clientCommunication.Main

My 'Main' class is called 'Main' and is in the 'clientCommunication' package.

I use the artifacts system in IntelliJ to build the jar. When I edit the artifact corresponding to my jar file, it correctly points to my main class. So I'm not sure what could be causing this issue, does anyone have nay ideas?

Incase it makes any difference, I execute the jar as follows:

java -jar MyProgram.jar
CaptainForge
  • 1,365
  • 7
  • 21
  • 46

1 Answers1

-1

MAINMANIFEST.MF should be in the root of the jar file

eg

MyProgram.jar/META-INF/MAINMAINFEST.MF

currently it is being located in

MyProgram.jar/main/resources/META-INF/MAINMANIFEST.MF

  • That doesn't seem right. I get a "cannot resolve class" error. I reference as in the file above, should I do it differently? – CaptainForge Jun 18 '16 at 01:08