How to add commons-math3-3.1.1.jar to intellij classpath

89 Views Asked by At

because I got no answer on thread How to add jar to classpath in IntelliJ? and I'm not the only one facing the problem I repeat this question in a new thread. I tried the file/Project Structure/Dependencies/jars feature. though everything seems ok after doing so I cannot import commons-math

Peter

1

There are 1 best solutions below

0
user3647093 On

Solution:

create a dir 'lib',

store the jar in it

right click on the jar and make it an external library

and last but not least enter two lines in build.gradle:

compileOnly fileTree(dir: 'lib', include: ['*.jar'])

implementation fileTree(dir: 'lib', include: ['*.jar'])

there is nothing to enter in project structure

but don't forget to refresh the dependencies via grails command

rebuild the project,

close it and open it again

peter