Setting Build Path has Encountered a Problem in Eclipse

Adding a jar to an eclipse project is normally really easy. I came home from school today after adding the AP Computer Science gridworld jar. I always have to add external libraries twice because at school we have OSX and at home I have Windows, so the file paths don’t match up.

So after trying to add the jar, I got this error.

“setting build path” has encountered a problem. Could not write file (Access is denied)

I thought that perhaps Eclipse required Administrative permissions to write to the classpath file. That didn’t make it any better. I recalled that Eclipse does some screwy things with file paths.

I did a little searching and I eventually came upon a blog with some instructions on the problem.

I kept getting this message in eclipse when attempting to change the dependencies under the project properties. The cause was copying a workspace from Linux to Windows. The windows hidden attribute is set on the .classpath file. Removing this attribute fixes the error.

After going into the workspace and project directory, I removed the hidden attribute. Eclipse was able to add the jar to the project perfectly after that.