13. Right click on the plugins folder and go to New>Java Class…
14. Write or paste your plugin into the Java Editor window.
15. Go to Build>Compile “(The name of your plugin)”
16. Click “Generate”
17. In the ide-file-targets.xml file in nbproject directory, change “${build.classes.dir}” to “plugins” in line 9
18. Delete line 8 in the ide-file-targets.xml file
19. Select your plugin from the ImageJ Project tree
20. Go to Build>Compile “(The name of your plugin)”
21. Go to Run>Debug Main Project (ImageJ will run. The plugin you created will be in the plugins menu)

* Plugin Class name should be ended as ‘_’ (underscore) to appear in ‘plugin’ menu of ImageJ…