File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes How Do I get the CodeKitchen Samples Out of the Jar File? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How Do I get the CodeKitchen Samples Out of the Jar File?" Watch "How Do I get the CodeKitchen Samples Out of the Jar File?" New topic
Author

How Do I get the CodeKitchen Samples Out of the Jar File?

David Ausman
Greenhorn

Joined: Jan 04, 2009
Posts: 12
I'm trying to get some of the code samples from a Jar file for the book Head First Java but I can't open them because it says it is missing a manifest.

I am using this command: java -jar codeKitchensTiger.jar

The file is located here:

http://www.wickedlysmart.com/HeadFirst/HeadFirstJava/HeadFirstJavaIndex.html

Am I using the right command?

Thank you.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

That's the correct command to run the jar file as an application, but it sounds like it's not an application, but merely an archive of files. The command to unpack such an archive would be

jar xf codeKitchensTiger.jar

The "jar" application is in the JDK, along with "java" and "javac".


[Jess in Action][AskingGoodQuestions]
Ryan Beckett
Ranch Hand

Joined: Feb 22, 2009
Posts: 192
Open the jar file in WinRar.
David Ausman
Greenhorn

Joined: Jan 04, 2009
Posts: 12
Ah! Gracias!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How Do I get the CodeKitchen Samples Out of the Jar File?