This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Cattle drive - Classes and Objects" Watch "Cattle drive - Classes and Objects" New topic
Author

Cattle drive - Classes and Objects

yen cheong
Greenhorn

Joined: Aug 14, 2001
Posts: 27
Hi
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
Yen
Johannes de Jong
tumbleweed
Bartender

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.
 
 
subject: Cattle drive - Classes and Objects
 
Similar Threads
catlle drive oop-1 to 4
CLASSPATH question in Linux SuSE
servlets
how to use com.javaranch.common in the assignment?
Can't configure classpath for OOP-1