Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9020687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:04:59+00:00 2026-06-16T05:04:59+00:00

Can you help me to setup the ImageJ plugin development with NetBeans IDE? I

  • 0

Can you help me to setup the ImageJ plugin development with NetBeans IDE?
I tried with existing project, but there is two problem’s:
– Java Free form porject: i cannot attach the onvif.xsd in this project.
– i’m trying this tutorial: tutorial but in the netbeans 7.2.1 i can’t do this: “Go to Build>Compile “(The name of your plugin)””

please give me advise!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T05:05:00+00:00Added an answer on June 16, 2026 at 5:05 am

    I am using Maven to develop ImageJ plugins in NetBeans. I’ll show how to create and debug a simple plugin.

    You can start by creating a new Maven project File->New Project->Maven->Java Application and creating a simple PlugIn class:

    package cz.cuni.lf1.imagejstubproject;
    import ij.IJ;
    import ij.plugin.PlugIn;
    public class Hello implements PlugIn {
      public void run(String arg) {
        IJ.showMessage("My_Plugin", "Hello world!");
      }
    }
    

    Now create a plugins.config file in folder src/main/resources with content:

    Plugins, "Hello World!", cz.cuni.lf1.imagejstubproject.Hello
    

    The first String is the menu folder in which your plugin will appear, the second is the menu label and the third is the full class name of the class to run when the menu item is clicked.

    Next step is to add a dependency to ij.jar which contains the ImageJ classes. This can be done by editing the pom.xml file and adding:

    <project>
      ...
      <build>
       ...
      </build>
      <dependencies>
        <dependency>
          <groupId>gov.nih.imagej</groupId>
          <artifactId>imagej</artifactId>
          <version>1.45</version>
          <scope>provided</scope>
        </dependency>
      </dependencies>
    </project>
    

    During the build process Maven will automatically download the required library from internet. It can also download source and JavaDoc.

    ImageJ requires that the name of the final jar contains an underscore so we set the filename accordingly. Change pom.xml to contain something like this:

    <project>
    ...
      <build>
        <finalName>${project.artifactId}_${project.version}</finalName>
        ...
      </build>
      ...
    </project>
    

    This is all you need to build a ImageJ plugin. If you compile it and copy the jar to ImageJ plugins directory you should see your plugin in the ImageJ plugin menu. If you do not want to debug your plugin in Netbeans, you can stop here.

    I do like to copy the new jar to the ImageJ plugins folder when I compile it in Netbeans so I can quickly try it out. You don’t even have to restart ImageJ to run your new plugin. Just click Help->Refresh Menus in ImageJ to reload plugins. To copy the plugin to the ImageJ folder on comile, edit pom.xml to contain:

    <project>
      ...
      <properties>
       <imagej.path>c:\Program Files (x86)\ImageJ</imagej.path>
      </properties>
      <build>
        <finalName>${project.artifactId}_${project.version}</finalName>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <id>copytoplugins</id>
                <phase>install</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <tasks>
                    <copy todir="${imagej.path}/plugins/" file="target/${project.build.finalName}.jar"/>
                  </tasks>
                </configuration>
              </execution>
            </executions>
          </plugin>
          ...
        </plugins>
      </build>
      ...
    </project>
    

    And edit the imagej.path property to point to your ImageJ installation folder (not the plugins folder). Now your plugin should be copied to the plugins folder on each build.

    To be able to debug your plugin from Netbeans add this to your pom.xml:

    <project> 
      ...   
      <build>
        <finalName>${project.artifactId}_${project.version}</finalName>
        <plugins>
          ...
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.2</version>
            <executions>
              <execution>
                <goals>
                  <goal>exec</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <executable>java</executable>
              <commandlineArgs>-jar     -agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address} "${imagej.path}/ij.jar"    </commandlineArgs>
              <workingDirectory>${imagej.path}</workingDirectory>
            </configuration>
          </plugin>
        </plugins>
      </build>
      ...
    </project>
    

    And then right click on your project and select properties. In the Actions tab edit the Debug Project action to this:

    • Execute goals: process-classes org.codehaus.mojo:exec-maven-plugin:1.2:exec
    • Activate profiles:
    • Set properties: jpda.listen=true

    Now when you click Debug Project in NetBeans ImageJ shoud run and you shoud be able to debug your plugins.

    You can download this sample plugin here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anybody help how to setup a automatic backup of mysql database and then
Can someone help me on how to setup such a result: Want to know
I can't login to github with generated ssh-keys. I've followed this manual: http://help.github.com/linux-key-setup but
Who can help me to fix the following problem? Here is the issue: in
Can anyone psuedo a solution to my problem, or just give discussion to help
I'm new to plugin and WP development, so I need some help. What I'm
I really hope someone can help with this problem. I have an ajax pagination
Hopefully someone here can help me! I'm trying to set up fancybox so when
Can anyone help me out please? I'm confused. I want to set up my
Anyone can help me? Trying to Add a Slow function with my smoothscroll and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.