Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cattle drive - Classes and Objects

 
yen cheong
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5089
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
  • 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
Posts: 424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic