It will show errors in the red part at the bottom and a 'red lightbulb' that when clicked shows you an option to add the files to the artifact. Intellij will give you the shortcut shown below.
![intellij jar classpath option intellij jar classpath option](http://allaboutscala.com/wp-content/uploads/2016/05/classpath_7-1024x571.png)
![intellij jar classpath option intellij jar classpath option](https://blog.karthicr.com/images/posts/20160710_creating_an_executable_jar_in_intellij_idea/ideajar10.png)
I apparently never added the properties files to the artifacts that required them, which is a separate step in Intellij.
INTELLIJ JAR CLASSPATH OPTION HOW TO
I spent quite a lot of time figuring out how to do this in Intellij 13x. If you want to test with different log4j configurations, it may be easier to specify a custom configuration file directly in the Run/Debug configuration, VM parameters filed like: It's the same as the first way except you don't need to add another Source root in the Module Paths settings, the file will be copied to the output directory on Make. Yet another solution would be to put the log4j.properties file directly under the Source root of your project (in the default package directory). Go to Project Structure | Modules | Your Module | Dependencies, click Add, Single-Entry Module Library, specify the path to the "resources" folder. If the Resource Patterns contains the extension of your resource, then it will be copied to the output directory when you Make the project and output directory is automatically a classpath of your application.Īnother common way is to add the "resources" folder to the classpath directly.
![intellij jar classpath option intellij jar classpath option](https://i.stack.imgur.com/hnpPh.png)
Actually, you have at least 2 ways to do it, the first way is described by ColinD, you just configure the "resources" folder as Sources folder in IDEA.