How to enable Apo Commons IO in Eclipse? (Java)

How to configure an 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 this gives an error:

IOUtil cannot be resolved

+6
java eclipse
source share
3 answers

You can also use the built-in eclipse plug-in tools like m2eclipse or IAM (formerly Q4e ).

IAM can be installed after these instructions , and ha sa great dependency viewer

alt text

The differences between m2eclipse and IAM are discussed here , there and here .

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

The big thing is that m2eclipse forks uses external maven (to run maven targets), while iam/q4e uses only the built-in .
Our position here is that it is a way to integrate more deeply and improve productivity.
This, of course, allowed us to quickly do things like look at dependency analysis and some other β€œmagic” in the incremental maven builder.

+4
source share

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

+7
source share

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

+4
source share

All Articles