• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jar vs zip in OOP1

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 JavaRanchCommon.zip.
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.
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
rick
 
Ranch Hand
Posts: 424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
Peter
 
reply
    Bookmark Topic Watch Topic
  • New Topic