Importing classes from the root of external jars (.jar) in Intellij (Maven Project)

imagej
plugin

#1

I’m using IntelliJ 2016 for ImageJ plugin development. I have some dependenciesthat I added successfully, the two external libraries show up in the form of jar files . I’ve added them in project structure -> module -> dependencies and they show up correctly under external libraries as well (added them to POM) , the classes show up inside them, and the dependency scope is set to compile.

One of them is being imported successfully, while the other is not. The one that works is in a sub folder in the jar

import fiji.threshold.Auto_Local_Threshold;
the other one is right under the jar and the name is not recognized when I try:

import MultipleKymograph_;
I’m not sure what is the thing I’m missing but it might be that the only classes that I can’t access are directly in the jars.

Can you help me import it to use in my plugin?

Thank you for your time!


#2

Dear @Youcefhd,

this SO question is very related, although it’s not specifically about IntelliJ:

You could file an issue at the GitHub project and/or create a PR (that moves the classes into a package s.t. they can be imported). If you need help with that, just let us know!

Best,
Stefan


#3

Thanks a lot. I will do that.

Best,
Youcef


#4

Thanks to @Youcefhd’s efforts, the Multi Kymograph plugin is now in the package sc.fiji.multiKymograph. See fiji/Multi_Kymograph#1 for details.