I am getting no main manifest attribute
while running the jar create by Intellij. I extracted the jar and observed that there was another manifest file, not the one I had specified while creating artifact.
When I open manifest in IDE, it displays everything right but after creating jar I get a whole new manifest file.
Manifest-Version: 1.0
Main-Class: YoutubeList
I tried every solution from other answers and still not getting it right. Why creating a simple jar is hell of a task in Intellij, it was supposed to help developers!
Edited
And sometimes it does not include .class files in Jar which results in could not found or load class
gradle build
, Gradle will compile and test your code, and create a JAR file containing your main classes and resources" - docs.gradle.org/current/userguide/tutorial_java_projects.html