无法从命令行运行jar文件:“no main manifest attribute” [英] Failing to run jar file from command line: “no main manifest attribute”
本文介绍了无法从命令行运行jar文件:“no main manifest attribute”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
java -jar ScrumTimeCaptureMaintenence.jar
我收到错误:
无法执行jar文件:no main manifest attribute
正如你所看到的,我其实有一个主文件,它从eclipse运行正常:
我需要做什么才能从命令行成功运行此文件?
解决方案
尝试运行
java -cp ScrumTimeCaptureMaintenence.jar主
I am trying to run a jar file from the console:
java -jar ScrumTimeCaptureMaintenence.jar
And am getting the error:
Can't execute jar- file: "no main manifest attribute"
As you can see I do in fact have a main file and it runs fine from eclipse:
What do I need to do to successfully run this file from the command line?
解决方案
Try to run
java -cp ScrumTimeCaptureMaintenence.jar Main
这篇关于无法从命令行运行jar文件:“no main manifest attribute”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文