Salman Being human
Salman Being human

Reputation: 1

Runnable jar file error

When I open a .jar file through CMD by using the following command:

java -jar myapp.jar"

I get the following error: "Main Class Not Found. Program Will Exit.."
Myapp.jar has a manifest file which looks like the following:

Manifest-Version: 1.0
Main-Class: EMP_details.login

I made this .jar file by going to Project>export>Jar, in Eclipse.

How can I avoid/fix this error?

Upvotes: 0

Views: 1757

Answers (1)

KrHubert
KrHubert

Reputation: 1030

Try to made jar by eclipse>Project>export> Runnable Jar.. But first you have to select file with main and right click>Run As>Run Configurations. And then you can select this file in Runnable JAR File Specificatoin Dialog > Launch configuration checkbox.

Upvotes: 1

Related Questions