2009-11-20 16 views
6

¿Cómo puedo configurar mi instalación de Eclipse para usar las clases de Apache Commons IO?¿Cómo incluir Apache Commons IO en Eclipse? (Java)

Quiero usar este código:

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

pero da el error:

IOUtil cannot be resolved

+0

¿Usa cualquier herramienta de construcción, i. mi. ¿Hormiga o Maven o Ivy? Ellos pueden ayudarlo con la administración de la dependencia. –

+0

referirme a un enlace para saber más sobre ellos y su uso – rover12

+0

http://ant.apache.org/ http://maven.apache.org/ http://ant.apache.org/ivy/ –

Respuesta

4

También puede utilizar las herramientas de construcción de plugins de Eclipse como m2eclipse o IAM (anteriormente Q4e).

IAM puede ser instalado siguiente those instructions, y ha s una gran dependency viewer

alt text

Diferencias entre m2eclipse y IAM se discuten here, there y 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.

4

Descargar Apache archivos .jar y añadirlos a la biblioteca a través de su IDE (Eclipse).

+0

no puedo encontrarlo en Internet ... ayúdame a encontrarlo – rover12

+0

http://www.google.co.uk/search? q = apache + commons + io - en algún lugar entre los primeros tres hits, probablemente aquí: http://commons.apache.org/downloads/download_io.cgi – Grundlefleck

Cuestiones relacionadas