Darcia14
Darcia14

Reputation: 224

No Main Manifest Attribute, IntelliJ

I Have been having this issue for a while and today finally solved it.

When creating a Jar artifact in IntelliJ and trying to run it, I always got the error

no main manifest attribute, in xxxx.jar

Upvotes: 0

Views: 1258

Answers (1)

Darcia14
Darcia14

Reputation: 224

The problem ONLY occured when I added library files to the artifact, and without external libraries the jar executed fine.

The process I followed to create the artifact was as follows : File -> Project Structure -> Artifacts -> add Jar -> from modules with dependencies... -> After The Next Windows the following was shown enter image description here

And my problem was fixed when I removed all the items that had 'Extracted" prefixes. I also added The Library File to look like this -> Which made my jar with library dependencies work again![enter image description here]2

Upvotes: 0

Related Questions