[ImageJ-devel] ImageJ netbeans plugin development...

Johannes Schindelin Johannes.Schindelin at gmx.de
Wed Jan 2 00:11:18 CST 2013


Hi Chris,

On Tue, 1 Jan 2013, Chris wrote:

> The only pom.xml file in my Netbeans project does not contain any imagej
> version.  This is the properties section of that pom.xml file:
> 
> 
> 	<properties>
> 		<project.rootdir>${basedir}</project.rootdir>
> 	</properties>
> 
> I added the line
> 
> <imagej1.version>1.47h</imagej1.version>
> 
> and that seems to have solved the error.

That is exactly what I suggested. Since you specified the SciJava POM as
parent of your pom.xml, the settings in the former are inherited by the
latter. What you now did was simply to override that inherited setting.

> However, I cannot discover how to make my plugin appear in the Plugins
> menu when I generate an instance of ImageJ using NetBeans Debug Project.
> When I created my project in Netbeans, I got MyProject and MyProject -
> Source Packages under the Files.  I put my java files in the plugins
> folder of the MyProject - Source Packages, and the .class files show up
> in the MyProject/build/classes/plugins folder.  I tried copying the
> .class file to the plugins folder in the MyProject - Source Packages,
> but still nothing shows up in the Plugins menu of the ImageJ instance --
> and, yes, there is an underscore in the name.  How do I get the plugin
> to show up in the ImageJ Plugins menu?

You need a plugins.config file in the generated .jar file. This is how it
is done in the minimal example:

https://github.com/imagej/minimal-ij1-plugin/blob/master/src/main/resources/plugins.config

In general, it is not a good idea to put plain .class (or even .java)
files into the plugins/ folder of ImageJ.app/.

In the Fiji project, we added a few convenience functions to have an
easier time to debug things from IDEs:

http://fiji.sc/Debugging#Debugging_plugins_in_an_IDE_.28Netbeans.2C_IntelliJ.2C_Eclipse.2C_etc.29

Ciao,
Johannes



More information about the ImageJ-devel mailing list