The content of this page has not been vetted since shifting away from MediaWiki. If you’d like to help, check out the how to help guide!
This section is out of date, potentially misleading or invalid. Be careful with any instructions here. When in doubt, ask for help from the community.
This article explains how to install and configure NetBeans for use with ImageJ2 development. Directions correspond to NetBeans 7.1.2, which added integrated Git support, and may need adjustment for other versions.
Install and configure NetBeans
Setting up NetBeans on Windows
Install Java Development Kit
Download and install OpenJDK.
Install NetBeans
Download and install NetBeans from the NetBeans website. Any bundle that includes Java SE should be fine.
Setting up NetBeans on macOS
Install NetBeans
Download and install NetBeans from the NetBeans website. Any bundle that includes Java SE should be fine.
Setting up NetBeans on Linux
Install Java Development Kit
Install Java using the package manager—e.g., for Ubuntu 10.04:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo aptitude update
sudo aptitude install sun-java6-jdk sun-java6-plugin
sudo update-java-alternatives -s sun-java6-sun
Install NetBeans
Install NetBeans using the package manager—e.g., on Ubuntu:
sudo aptitude install netbeans
Import the ImageJ2 source
- Choose Team › Git › Clone… from the NetBeans menu
- For the Repository URL, enter:
git://github.com/imagej/imagej2
- Click Next, check the
master\*
branch, then Next again, then Finish - When prompted, click Open Project…
- Select the “ImageJ” project in the tree then click Open
- Right-click the “ImageJ” project and choose Build
You may receive a warning about Maven when building the project. It is not required, but if you wish to eliminate it, you can install Maven from the Maven website.
Launch the program
- Double-click the “ImageJ” project to open it
- Right-click the “ImageJ” project and choose “Run”
- On the Main Class dialog, choose
net.imagej.Main
To expand the projects you can also right click on the top-level “ImageJ” and choose “Open Required Projects” (and “Close Required Projects” to close). During development you must select “Open Required Projects” before you can successfully do “Find Usages” in the “Open Projects” scope.
See also
To develop the original ImageJ, see these resources:
- Developing ImageJ 1.x plugins with NetBeans screencast
- example-legacy-plugin project template
- Developing Plugins for ImageJ 1.x tutorial