Manifest attribute error when running a java jar despite having manifest file

614 views Asked by At

I am trying to run a java executable jar from command line but it is throwing below error.

Commandline

java -jar myapp.jar com.avc.apb.printbatch.printfileuploadapplication

Error

no main manifest attribute, in myapp.jar

It is very confusing because I have manifest file inside my Jar and the file has below entry .

Main-Class: com.avc.apb.printbatch.printfileuploadapplication

My Jar structure is below.

myapp.jar
      -com
      -META-INF
            -MANIFEST.MF
      -application.properties
      -otherfiles

Manifest.mf contents

Manifest-Version: 1.0
Build-Jdk_Spec: 1.8
Created-By: Maven Jar Plugin 3.2.0
Main-Class: com.avc.apb.printbatch.printfileuploadapplication
0

There are 0 answers