File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

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".
 
GeeCON Prague 2014
 
subject: Error - "no main manifest attribute in jar"