when I am trying to run the jar file is give me the message fail to load Main-Class manifest attribute from..... I am programming using netbeans IDE 5.5 any help

Recommended Answers

All 9 Replies

Did you create the jar file using a manifest file?

e.g. >jar cvfm myjar.jar manifest.mf *.class

Did you specify the main class?

just check out the manifest file

In that manifest file specify your main class correctly. then it will work fine

as I describe I am using netbeans and when I try to modify the netbeans created manifest.mf and compile it . and then try to compile it complaines "corrupted file" when trying to run double clicking the jar file .

Then do it with command propmpt here is some explanation

commented: good +12

guys thanks very much I got the solution . in netbeans5.5 simply in the project properties select the run panel and enter the main class name then build the project that is all .

That is fine but you should also learn how to do it from command line as you may not always have NetBeans

ok thanks I will.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.