Using FileUtils in eclipse
Solution 1
Open the project's properties---> Java Build Path ---> Libraries tab ---> Add External Jars
will allow you to add jars.
You need to download commonsIO from here.
Solution 2
Now selenium supports following code:
FileHandler.copy(src, dest);
Solution 3
<!-- https://mvnrepository.com/artifact/org.apache.directory.studio/org.apache.commons.io -->
<dependency>
<groupId>org.apache.directory.studio</groupId>
<artifactId>org.apache.commons.io</artifactId>
<version>2.4</version>
</dependency>
Add above dependency in pom.xml file
Solution 4
I have come accross the above issue. I have solved it as below. Its working fine for me.
Download the 'org.apache.commons.io.jar' file on navigating to [org.apache.commons.io.FileUtils] [ http://www.java2s.com/Code/Jar/o/Downloadorgapachecommonsiojar.htm ]
Extract the downloaded zip file to a specified folder.
Update the project properties by using below navigation Right click on project>Select Properties>Select Java Build Path> Click Libraries tab>Click Add External Class Folder button>Select the folder where zip file is extracted for org.apache.commons.io.FileUtils.zip file.
Now access the File Utils.
Related videos on Youtube
prosseek
A software engineer/programmer/researcher/professor who loves everything about software building. Programming Language: C/C++, D, Java/Groovy/Scala, C#, Objective-C, Python, Ruby, Lisp, Prolog, SQL, Smalltalk, Haskell, F#, OCaml, Erlang/Elixir, Forth, Rebol/Red Programming Tools and environments: Emacs, Eclipse, TextMate, JVM, .NET Programming Methodology: Refactoring, Design Patterns, Agile, eXtreme Computer Science: Algorithm, Compiler, Artificial Intelligence
Updated on July 21, 2022Comments
-
prosseek almost 2 years
When trying to use
FileUtils
I get "cannot be resolved" error.Then, how do I install
FileUtils
library to be able to use it in Eclipse? I see it is an Ant utility, but I am not sure how many jars I need to install. -
Geshode almost 6 yearsAn answer should explain what it is doing.
-
Varun about 2 yearsChoose the latest version from here.