Help to develop an ImageJ plugin in Netbeans 8.02, but the tutorial does not correspond to the Netbeans on my Mac Powerbook Pro Retina Display (El Capitan)

I am trying to develop an ImageJ plugin in Netbeans 8.02, but the tutorial does not correspond to the Netbeans on my Mac Powerbook Pro Retina Display (El Capitan). I have used Netbeans previously to develop plugins utilizing jPanels and was able to debug and test in Netbeans, but now when I use the github I cannot see ImageJ, i.e., when I click on the help icon with a class that implements Plugin, it does not offer ImageJ’s plugin, but rather, “Add import for com.sun.webkit.plugin.Plugin”. Can anyone help me get the ImageJ connection correct for Netbeans?

I followed all the instructions at Developing ImageJ 1.x plugins with NetBeans on YouTube. The plugin gives an error at the “public class Auto_Slurry implements Plugin” line, and will not recognize the import ij.plugin.Plugin; it is an “unused import”. I can not find any way to resolve this error.

import ij.IJ;
import ij.plugin.PlugIn;

public class Auto_Slurry implements Plugin {
    public void run(String arg) {
        IJ.showMessage("This is a test plugin");
    }
    
    public static void main(final String... agrs) {
        new Auto_Slurry().run("");
    }
}

Class names in Java are case sensitive. Try writing implements PlugIn rather than implements Plugin.

Yes! Thank you! That was the problem. :slight_smile:

1 Like