954,224 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

fail to load Main-class manifest attribute from ......problem

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

teklu
Newbie Poster
12 posts since Jan 2007
Reputation Points: 10
Solved Threads: 1
 

Did you create the jar file using a manifest file?

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

Cerberus
Junior Poster
162 posts since Sep 2006
Reputation Points: 27
Solved Threads: 14
 

Did you specify the main class?

Ezzaral
Posting Genius
Moderator
15,985 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
 

just check out the manifest file

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

vinod_javas
Practically a Posting Shark
871 posts since Feb 2007
Reputation Points: 119
Solved Threads: 7
 

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 .

teklu
Newbie Poster
12 posts since Jan 2007
Reputation Points: 10
Solved Threads: 1
 

Then do it with command propmpt here is some explanation

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 901
 

I don't know, but the following might be useful to you.

http://www.daniweb.com/forums/thread37189.html

iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
 

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 .

teklu
Newbie Poster
12 posts since Jan 2007
Reputation Points: 10
Solved Threads: 1
 

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

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 901
 

ok thanks I will.

teklu
Newbie Poster
12 posts since Jan 2007
Reputation Points: 10
Solved Threads: 1
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You