I am using windows 8.1-64bit and Java 1.7.0_79 and Intellij idea community edition 14.1.2.
In a simple Java project I have dependency jar marked and the jar resides outside the project under C:/Users/username/Appdata/Roaming/lib/commons-io.jar. The project has just a single java file using a helper from FileUtils in apache commons-io.
There are no compilation errors marked on the editor. When I build the project it gives me a compilation error:
Error:(1, 29) java: package org.apache.commons.io does not exist
Error:(5, 28) java: cannot find symbol
symbol: variable FileUtils
location: class MyClass
However if i copy this jar into the project and mark as a dependency the project build fine. It seems to be specific to the fact that the jar dependency is outside the project directory.
On switching to java 8, the issue does not occur and is specific to Java 7 and happens only on windows (Could not reproduce it on MacOS)
Any ideas what may be causing this ?
I have attached a screenshot showing the editor with no compilation error and the project build failure.
Attachment(s):Screen Shot 2015-05-27 at 4.57.54 pm.png