File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Cattle Drive and the fly likes jar vs zip in OOP1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "jar vs zip in OOP1" Watch "jar vs zip in OOP1" New topic

jar vs zip in OOP1

Ronald Schindler
Ranch Hand

Joined: Jul 11, 2000
Posts: 50
Looking for some clarification. I've begun working on OOP1 and the purpose as we all know is: To learn how to use someone else's classes, how to integrate a jar file into your program.
Now the download we're asked to pick up is
I understand that it asks me to put the zip in my classpath. (Which I am ineffectively doing). However, does this mean that this zip file is in effect considered a jar or do I have to convert it somehow.
Thanks for any assistance.
Rick Prevett
Ranch Hand

Joined: Apr 16, 2001
Posts: 68
There's no need to do anything to the .zip file. Your program will automatically access the class it wants. It doesn't matter whether the file's in a .jar or .zip file. As long as you've got the classpath part down, you're good to go.
Peter Gragert
Ranch Hand

Joined: Jan 16, 2001
Posts: 424
To my knowledge a *.jar file uses the same compressing technique as a *.zip file. They are (more or less) interchangable.
The jar program includes a meta-inf directory (with...), which a 'zipper' doesn't.
Using a zipper you need to use the feature to include path information (for packages).
So for java-programs I use jar and very often make the jar file with extension *.zip to look automatically with those nice zip-programs to the content. (I love this smiley)
I agree. Here's the link:
subject: jar vs zip in OOP1
It's not a secret anymore!