I'm working on updating some Java code for my job, using Eclipse. In this project, there is a JAR file, stored in a 'resources' folder within the project folder, being imported by the main class. This JAR file contains a class we need to use, within another class. So, the import statement looks like:
import pkg.Class.InnerClass;
I can't actually put the names online, for confidentiality. This InnerClass has a method, which we'll call setState(boolean b). In our main class, we need to use this method... But when I type it out, a red line appears under the invocation, with the error message,
"The method setState(boolean) is undefined for the type Class.InnerClass."
This is clearly false! Almost all of the other methods in InnerClass work just fine, and it only seems to be an error with this specific class. I've checked and double-checked the build path configuration, and there isn't anything abnormal about it. I cannot change the JAR file, but I can see the contents using a decompiler plugin. Does anyone know something I don't, or has someone run into this problem before and been able to work around it somehow?
Edit: Here's a sketch of what the Class.java file looks like:
package pkg;
import ...;
public class Class {
public class InnerClass {
public void setState( boolean paramBoolean ) {
...
}
public void setOtherState( boolean paramBoolean ) {
...
}
}
}