-1

Will Apache Commons IO classes be usable if I add Apache Ant to the project build path?

I need to use IOUtil class. If no please provide the download link to the correct JAR file.

рüффп
  • 5,172
  • 34
  • 67
  • 113
rover12
  • 2,806
  • 7
  • 27
  • 28
  • What do you mean by useable? - the calsses are standard Java classes so will run as a normal class – mmmmmm Nov 20 '09 at 11:52
  • i mean to say IOUtil is not getting resolved.. and i cant find any apache.jar on the internet to make use of Apache commons IO classes help me out guys .. you can say take away my points if you want .. cause i'm new and have stupid questions to ask – rover12 Nov 20 '09 at 12:38
  • Yes, agreed, but keep in mind, that at SO real persons try to solve your problems, and the community honors the personal effort spent on solving your own problem - and vice-versa. (see my answer for a solution) – Andreas Dolk Nov 20 '09 at 12:45

3 Answers3

7

Grumpy Old Mlk Time (bye bye rep points):
You have to actually learn Java and the tools not just string together odd snippets of code.

In this case I recommend you head back to your original thread on this subject and read the tutorial I posted and ignore Commons IO for now. You are going to a lot of trouble to avoid a very small amount of boiler plate code.

One you have done that it might be worth reading a little about the classpath and how one configures that (called the build path) in Eclipse.

Community
  • 1
  • 1
Michael Lloyd Lee mlk
  • 14,561
  • 3
  • 44
  • 81
  • +1 for patience and being honest :) (I bet, the next question is something like: 'please define use of classpath' or so) – Andreas Dolk Nov 20 '09 at 12:00
  • 3
    +1 If only there was a "grumpy old fart" badge. I'd have 2 dozen of them by now. – skaffman Nov 20 '09 at 12:01
  • +1 from me as well, I think you're right; @Andreas_D yup, http://stackoverflow.com/questions/1769889/how-to-include-apache-commons-io-in-eclipse-java – laura Nov 20 '09 at 12:05
  • @skaffman - should we ask for this on meta.stackoverlow ? Along with the "in my day..." badge... – Brian Agnew Nov 20 '09 at 13:28
3

Easiest approach

  1. Download Apache Commons IO from the Apache foundations website
  2. create a folder 'lib' in your eclipse project and copy the commons library (jar) in it
  3. right-click the project and do a refresh (if the library is not yet displayed)
  4. right-click the library and do "Build Path" - "Add to build path"

(I don't have the eclipse up and running, hope the menu and action names are correct)

Andreas Dolk
  • 113,398
  • 19
  • 180
  • 268
1

Yes, they'll be just as useable as if you hadn't added Ant.

Carl Smotricz
  • 66,391
  • 18
  • 125
  • 167
  • actually i forgot to add that they are not usable now.. i dont know how to add apache commons io to make it usable i though adding ants would make it usable . – rover12 Nov 20 '09 at 12:35
  • Nope, Ant is a build tool, not a fix for an incomplete classpath. – Carl Smotricz Nov 20 '09 at 14:31