Will Apache Ant make IOUtil class usable?

2019-09-20 11:55发布

问题:

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.

回答1:

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)



回答2:

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.



回答3:

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