Can't execute jar- file: “no main manifest attribute”

后端 未结 30 2372
不知归路
不知归路 2020-11-21 22:30

I have installed an application, when I try to run it (it\'s an executable jar) nothing happens. When I run it from the commandline with:

java -jar \

30条回答
  •  滥情空心
    2020-11-21 23:04

    For me, none of the answers really helped - I had the manifest file in correct place, containing the Main-Class and everything. What tripped me over was this:

    Warning: The text file from which you are creating the manifest must end with a new line or carriage return. The last line will not be parsed properly if it does not end with a new line or carriage return.

    (source). Adding a newline at the end of the manifest fixed it.

提交回复
热议问题