开发者

"Could not find the main class: bla.bla.yada", although specified correctly in the MANIFEST.MF

开发者 https://www.devze.com 2022-12-29 06:10 出处:网络
I\'m trying to run a .jar file with the command \"java -jar F开发者_如何学编程ilename.jar\", but I am always getting an error saying \"Could not find the main class: bla.bla.yada\".

I'm trying to run a .jar file with the command "java -jar F开发者_如何学编程ilename.jar", but I am always getting an error saying "Could not find the main class: bla.bla.yada". I build the whole application with Maven and specified a Main-Class in the MANIFEST.MF. The path in the file is correct and the class also exists at the right location in the jar.

The ending .class is omitted in the MANIFEST.MF. I hope this is correct. Do you have any other hints?


Make sure that you also have all required libraries in your class path, when you run your jar.

0

精彩评论

暂无评论...
验证码 换一张
取 消