This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes Error - Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "Error - "no main manifest attribute in jar"" Watch "Error - "no main manifest attribute in jar"" New topic
Author

Error - "no main manifest attribute in jar"

Ben Terova
Greenhorn

Joined: Aug 05, 2012
Posts: 3
I happen to be getting this error

"no main manifest attribute, in test.jar"


when my code is:




Any suggestions?

Thank you
AmanZeeK Verma
Greenhorn

Joined: Dec 06, 2010
Posts: 29

How did you create your test.jar file ?

The META-INF folder inside jar has a file MANIFEST.MF which seems to be missing entry for main class

something like Main-Class: com.zeek.test.SomeClassName
Ben Terova
Greenhorn

Joined: Aug 05, 2012
Posts: 3
I happened to have fixed the problem before you could reply, but I have another question, is it possible to start a seperate .jar within a .jar?
Paul Clapham
Sheriff

Joined: Oct 14, 2005
Posts: 19720
    
  10

No. Or at least, some clever Java programmer could probably figure out some clever way of doing that, but there really isn't any point in doing it. At least, not if "to start a jar" means what you're doing at the command line when you type "java -jar thingy.jar".
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Error - "no main manifest attribute in jar"
 
jQuery in Action, 3rd edition