jQuery in Action, 3rd edition
The moose likes Cattle Drive and the fly likes Cattle drive - Classes and Objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Cattle drive - Classes and Objects" Watch "Cattle drive - Classes and Objects" New topic

Cattle drive - Classes and Objects

yen cheong

Joined: Aug 14, 2001
Posts: 27
I have downloaded the JavaRanchCommon.zip file and saved this to I:\Java directory on the Unix machine where I am doing the assignments. Do I have to unzip this file? What is the jar file, is this the same as the zip file? Do I add I:\Java; I:\Java\JavaRanchCommon.zip to my classpath and place "import com.javaranch.common" at the top of my DaysOld.java file?
What does the path "com..." mean?
Thanks for your help
Johannes de Jong

Joined: Jan 27, 2001
Posts: 5089
  • No you dont have to unzip the file
  • JAR is Sun's name for a .zip file. As far as I know they are identical
  • Yes you add add I:\Java\JavaRanchCommon.zip to you classpath
  • You add import com.javaranch.common.* ; at the top of your DaysOld.java file
  • Com is the root Directory of the "package" in the JavaRanchCommon.zip

  • Good luck
    [This message has been edited by Johannes de Jong (edited August 20, 2001).]
Peter Gragert
Ranch Hand

Joined: Jan 16, 2001
Posts: 424
Johannes is right.
Depending on the properties of your 'unzip'program
(I mean if your zip program allows to view the content of
a zip-file unzipping is not needed) you can nevertheless unzip the files to look at the source code of the classes inside and/or
add changes etc.
I agree. Here's the link: http://aspose.com/file-tools
subject: Cattle drive - Classes and Objects
It's not a secret anymore!