David Tunnell David Tunnell - 4 months ago 24
Java Question

Failing to run jar file from command line: “no main manifest attribute”

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:

main method is in class

What do I need to do to successfully run this file from the command line?


Try to run

java -cp ScrumTimeCaptureMaintenence.jar Main