I was having same issue then realized that the version of commons-io getting picked up was lower than what I need (2.4)....I need to Override the already managed version as below to get the right one picked up:
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
Answer from puppyDomminatedWorld on Stack OverflowI was having same issue then realized that the version of commons-io getting picked up was lower than what I need (2.4)....I need to Override the already managed version as below to get the right one picked up:
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
I also faced the same issue, but after adding dependency in pom error got removed.
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
you can also refer URL http://zetcode.com/java/fileutils/
it started working now. I downloaded commons-io-2.4 from a different resource and imported to my project. Thanks
I had the same issue, solved by adding 'commons-io:commons-io:2.4' to dependencies in build.gradle:
dependencies {
testImplementation (
'commons-io:commons-io:2.4'
)
}
When in the project structure menu, I add a library, go to the path of my extracted zip file and select it. It give me the option between the main and test files and I select main, it adds it but I can't use them in my project.
Don't use Maven or Gradle if you can't even manage adding a JAR to your project manually.
You should acquire those JARs (containing .class byte code files, not .java source), add them a folder in your project named /lib, and add that directory as a JAR source location in your project. They'll be in the CLASSPATH then.
You need to add the /lib folder to an artifact when you run. Be sure you know how to do that as well.
I ran into this error after upgrading IntelliJ to version 2019.1. These steps fixed it for me:
- Click
Runfrom the toolbar - Choose
Edit Configurations - Make sure the Scratch file you want to run is selected on the left panel
- In
Use classpath of moduledropdown, select the project module that contains the proper module