java - Intellij/Gradle - Can't see Jar in classpath although it exists in module -


when running app in intellij following exception:

exception in thread "main" java.lang.noclassdeffounderror: org/slf4j/loggerfactory 

while when running via gradle run task there no such error.

when checking if slf4j jar (which not direct dependency build.gradle) appears in classpath intellij runs, doesn't,

but does appear in external dependencies tree:

enter image description here

you need add intellij project classpath. can done clicking on red bulb on editor or adding manually in project settings


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -