It's not a secret anymore!
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
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: 9059
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.
I agree. Here's the link:
subject: codeKitchens.jar from headFirstJava website
It's not a secret anymore!