# Idea Open the Jar package and report an error that there is no main manifest attribute (there is no main manifest attribute in .JavaTest.jar)

Idea does not have the main manifest property when starting the Jar package (there is no main manifest property in .\JavaTest.jar)


Solution: modify the location of META-INF/MANFEST.MF

Insert picture description here

When the location is as shown in the figure above, check the contents of the MANIFEST.MF file as follows: the main class address of the error reason is incorrect

Manifest-Version: 1.0
Main-Class: http.HttpTest

amend as below

Insert picture description here

Insert picture description here
Run the generated jar package to start successfully!

Guess you like

Origin blog.csdn.net/qq_37248504/article/details/109187791