2 years ago
#71764
Captain Jacky
"no main manifest attribute" when building .jar (Gradle)
I've been trying many different things throughout various posts, but none of the solutions have helped me.
Creating an artifact through
Build->Build artifacts..., selecting directory forMETA-INF/MANIFEST.MFasmain\resourcesand running a generatedjarfile throwsno main manifest attribute.<..>, selecting directory forMETA-INF/MANIFEST.MFasmain\javaand running a generatedjarfile returnsCould not find or load main class.
My MANIFEST.MF:
Manifest-Version: 1.0
Main-Class: <package>.MainApplication
Also, in my build.gradle I have:
jar {
manifest {
attributes 'Main-Class': '<package>.MainApplication'
}
}
I have tried creating a new project, but the problem persisted the same. I hope someone could help me. Thank you.
UPDATE:
Demo project example (FileMail), which produces my error.
Demo project example (MediaFire)
UPDATE 2:
java
intellij-idea
jar
manifest.mf
0 Answers
Your Answer