This has been driving me nuts for awhile. I have an overloaded method which is located in a jar file. This jar file has a number of common classes with are used by many other jar files. The common jar file compiles without error. I'll be calling it common.jar.
Whenever I try to use that method from detroit.jar I receive a "cannot find symbol" error. Other usages of the method compile fine, just one specific version of the method gets the error message.
1. Foo.print(2, 3);
2. Foo.print(new File("x.txt"), 42);
Methods 1, 2 & 3 compile and work. So my imports are there. However, method 4 causes detroit.jar to fail compiling with the "cannot find symbol" error. I know the method for #4 is there. When I have Netbeans "goto source" it correctly finds the source method for #4. When I "find usages" for #4 it correctly identifies the non-compiling usage of it so Netbeans knows it exists too. The only difference between the first three working methods and the last method is the last method is new which seems to be key.
When I try to duplicate this problem from within a different jar, say chicago.jar, it compiles just fine. So, there seems to be something specific between common.jar and detroit.jar which is conspiring to tick me off. I've tried clean rebuild for both, no avail. Renaming the #4 method gets the same error. No changes I make in common.jar are being seen by detroit.jar. However, those changes ARE seen by chicago.jar. There are other jar files which detroit.jar imports and changes to those jar files compile/work just fine. wtf.