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

后端 未结 30 1899
不知归路
不知归路 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 22:55

    You Can Simply follow this step Create a jar file using

     jar -cfm jarfile-name manifest-filename Class-file name
    

    While running the jar file simple run like this

     java -cp jarfile-name main-classname
    

提交回复
热议问题