0
I need to use the class Reversedlinesfilereader, which belongs to the org.apache.Commons.io.input library.
@Tommelo told me that I should include a dependency of this library in the archive pom.xml from Maven. This is the dependency: mvnrepository.com/Artifact/Commons-io/2.5
I copied and pasted the dependency into the file pom.xml, in a blank space, exactly as she was:
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency
That’s right, I shouldn’t include any code before entering the dependency?
The other question is, how do I care about my Java class that I’m writing in a Java Project in Eclipse? I tried: import org.apache.Commons.io.input; but Eclipse does not recognize org.apache, even though I already included the dependency in Pow.xml.
Where is the error?
Turn your project into a Maven project. You can by right-clicking on the project, there by the last options will appear something of nature (has a submenu), then you ask to turn into Maven project
– Jefferson Quesado
And that’s the fun of the Maven dependencies, you just have to declare that you will use them, you don’t need much else in pom.xml
– Jefferson Quesado