aspose file tools*
The moose likes Beginning Java and the fly likes codeKitchens.jar from headFirstJava website Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "codeKitchens.jar from headFirstJava website" Watch "codeKitchens.jar from headFirstJava website" New topic

codeKitchens.jar from headFirstJava website

Frodo Boonyoung

Joined: Dec 22, 2004
Posts: 5
Why I can't do
c:\> java -jar codeKitchens.jar

I got message:
Failed to load Main-Class manifest attribute from

How I can break that jar?

miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
in windows use open with winzip

java amateur
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9043
jar tvf codeKitchens.jar will list the contents of the jar.

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Frodo Boonyoung

Joined: Dec 22, 2004
Posts: 5
What the heck I can solve my noob proble expeditiously!!!

Thank you so much
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
You cannot run the JAR file because it wasn't created to do so. I suspect that it contains many separate examples and is not meant to be run as a single program. To run the individual examples, you can use

jar xvf codeKitchens.jar

to extract them first. Then you probably need to compile and run each one separately.



Java API Documentation
The Java Tutorial
Surasak Leenapongpanit
Ranch Hand

Joined: May 10, 2002
Posts: 341
If the codeKitchens.jar has the only one main class, you can add Main-Class: classname to the JAR file's manifest and run using java -jar codeKitchens.jar.
It is sorta covered in the JavaRanch Style Guide.
subject: codeKitchens.jar from headFirstJava website
Similar Threads
MANIFEST needed in submission.jar?
WebSphere4 AAT
Need an executable jar to return a value
Head First Java - puzzle survey
Head First Java by Bert Bates, Kathy Sierra