Adding external libraries
When you have created a plugin for processing, you may want to add some functionality that is not available in the ImageJ core API. In this case, you may want to use an external library that has the functionality that you require. If you use Maven to set up your project, adding a library is as easy as listing it in your <dependencies>
section of your POM file. As an example, I will show you how to add the Apache POI library to add an option to export the results of our work to an MS Excel file. The advantage of this library is that it can create an .xls(x)
file on all platforms, regardless of whether MS Excel is installed. I will briefly show you how to create an Excel file, write some data to it, and then save the result as an .xls
file.
Adding the dependency for Apache POI
To add the dependency of the POI project in your POM file, you will need to add the org.apache.poi
project to your <dependencies>
section. The IDE can help you with this process using...