Easy Question

I have a java project that gives me mysterious compile errors. Several classes won't compile when I run "Build/Make" from the toolbar. The compiler complains about a certain import statement in many classes. The error is "cannot resolve symbol class PrmFuncs".

If I edit one of these classes, the little square to the upper right of the editot window is green or yellow, never red. I can successfully compile any of these classes directly by using "build/compile foo.java" from the toolbar.

I can select the offending import statement and type ^B to go to the class (PrmFuncs.java). So Intellij understands the import statement, and the java file seems to be where it belongs.

Now PrmFuncs.java is open and is "green". From the toolbar, "build/compile PrmFuncs.java" compiles fine. So I am at a loss.

One telling piece of information is editor tab associated with PrmFuncs.java. Like all my other classes, this class has the blue "j" showing this is a java file. However, it also has a little "x" to the upper left of the "j". I don't know what this means,or how to find out except to post here. I bet when I made that "x" goes away, the problem goes away too.

Any ideas?



I love "SnagIt"... here's what it looks like.


You have at some point excluded this file from your compile. Re-include
it by going to Preferences->Compiler->Exclude from Compile and removing
it from the list.

Yep, easy ;)


Good lord why did I do that :-D

Thank you, compiles clean now.


The easiest way to do "Exclude from compile" is by right-clicking on a compile error in a build output window. That's easy enough that you could conceivably have done it by accident. I have. Difficult to track down, too.

--Dave Griffith


Please sign in to leave a comment.