# Troubleshooting an Issue with 3rd Party Library Integration

**URL:** https://discourse.processing.org/t/troubleshooting-an-issue-with-3rd-party-library-integration/9538
**Category:** Libraries
**Created:** [March 22, 2019, 7:05pm UTC](https://discourse.processing.org/t/troubleshooting-an-issue-with-3rd-party-library-integration/9538 "2019-03-22T19:05:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![graysonh](https://avatars.discourse-cdn.com/v4/letter/g/a8b319/32.png) [@graysonh](https://discourse.processing.org/u/graysonh)
#### Post date: [March 22, 2019, 7:05pm UTC](https://discourse.processing.org/t/troubleshooting-an-issue-with-3rd-party-library-integration/9538/1 "2019-03-22T19:05:23Z")

</div>

Hello all,

I am working on a project that uses the ImageJ library for image analysis and I have run into a problem that I don’t understand. I have downloaded the ImageJ jar file, added it to my project, and created a test file which uses the ImageJ classes and functions as a proof of concept for my larger project.

That test was done in without setup() or draw() and was just run through once when the run button was pressed.

When I tried to integrate the code into my larger project (which has setup() and draw() functions) it showed that some of the same class constructors that I used weren’t recognized. Below is a code snippet from the proof of concept.

```auto
import ij.*;
import ij.process.*;
import ij.plugin.filter.ParticleAnalyzer;
import ij.measure.ResultsTable;
import ij.text.TextWindow;
import ij.WindowManager;

//init ImagePlus
ImagePlus imp = new Opener().openImage(this.imagePath);
println("Image loaded...");

/////////////
// There are image analysis functions here
/////////////

double minSize = 0;
double maxSize = 999999;
int options = ParticleAnalyzer.SHOW_RESULTS;
int measurements = Measurements.AREA;
ResultsTable rt = new ResultsTable();
ParticleAnalyzer pa = new ParticleAnalyzer(measurements, options, rt, minSize, maxSize);
pa.analyze(imp);
println("Particles Analyzed...");

/////////////
// I do stuff with the ResultsTable and the particle data here.
/////////////

```

When I try to integrate this into my larger project everything seems to be recognized by the compiler EXCEPT these two lines:

```auto
ResultsTable rt = new ResultsTable();
ParticleAnalyzer pa = new ParticleAnalyzer(measurements, options, rt, minSize, maxSize);

```

These are the errors shown in Processing:  
The constructor “ResultsTable()” does not exist  
The constructor “filter.ParticleAnalyzer(int, int, ResultsTable, double, double)” does not exist

I did double check in the [ImageJ API](https://imagej.nih.gov/ij/developer/api/index.html) to make sure these were the correct constructors, so I am at a loss for what the issue is here.

I would really appreciate any advice on this.

Thank you,  
Grayson

---

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [March 25, 2019, 9:02pm UTC](https://discourse.processing.org/t/troubleshooting-an-issue-with-3rd-party-library-integration/9538/2 "2019-03-25T21:02:36Z")

</div>

> [@graysonh](#):
>
> When I tried to integrate the code into my larger project

One guess – did you double-check that the ij.jar had actually been added separately to your larger project? Drag and drop install of jars is per-sketch.
