First, I am very new to Java and my programming in general is rusty. So I might have missed something very simple.
The error:
cannot find symbol
symbol : method setMethod(java.lang.String)
location: class ij.plugin.Thresholder
Thresholder.setMethod("Mean");
Some code snippets:
This part is third party code. I would like to avoid modifying this as much as possible
public class Thresholder implements PlugIn, Measurements, ItemListener {
private static String staticMethod = methods[0];
public static void setMethod(String method) {
staticMethod = method;
}
}
My code (well, some relevant parts)
import ij.plugin.Thresholder;
public class CASA_ implements PlugInFilter,Measurements {
public void run(ImageProcessor ip) {
track(imp, minSize, maxSize, maxVelocity);
}
public void track(ImagePlus imp, float minSize, float maxSize, float maxVelocity) {
Thresholder.setMethod("Mean"); <-- This is the line the compiler hates
}
}
Why is the compiler looking for a setMethod method with a return of something other than void?
Thanks
Copyright Notice:Content Author:「user2425977」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/16778703/compiler-error-cannot-find-symbol-java