7

How can I configure my Eclipse installation to use classes from Apache Commons IO?

I want to use this code:

IOUtil.write(encoded, new FileOutputStream(new File("target-file.txt")))

But it gives the error:

IOUtil cannot be resolved

4
  • Do you use any build tool, i. e. Ant or Maven or Ivy? They can help you with dependency management. Commented Nov 20, 2009 at 11:33
  • refer me to a link to know more about them and there usage Commented Nov 20, 2009 at 11:34
  • ant.apache.org maven.apache.org ant.apache.org/ivy Commented Nov 20, 2009 at 11:52
  • Duplicate of stackoverflow.com/questions/1770005/… Commented Nov 20, 2009 at 11:59

3 Answers 3

8

What you need to do is this: How to import a jar in Eclipse add jar

Sign up to request clarification or add additional context in comments.

Comments

4

You also can use build tools eclipse plugins like m2eclipse or IAM (formerly Q4e).

IAM can be be installed following those instructions, and ha s a great dependency viewer

alt text

Differences between m2eclipse and IAM are discussed here, there and here.

Q4E is event-oriented, I believe that m2e uses the console and stdin/out.

A bigger one is that m2eclipse forks and uses an external maven (for running maven goals) while iam/q4e only uses the embedder.
Our position here is that it is the way to go, allowing deep integration and better performance.
It certainly has allowed us to quickly do things like the dependency analysis view and some other "magic" in the maven incremental builder.

Comments

4

Download Apache .jar files and add them to library through your IDE (Eclipse).

2 Comments

cant find it on the internet .. help me find it
google.co.uk/search?q=apache+commons+io - somewhere among the first three hits, probably here: commons.apache.org/downloads/download_io.cgi

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.