package org.scijava.plugin does not exist

30 views
Skip to first unread message

zwei2001

unread,
Jul 25, 2020, 12:00:23 PM7/25/20
to scijava
Hello,

I'm new using scijava, just had my first try for Fiji plugin. In my java code, I added one line:
import org.scijava.plugin.Plugin;

However, when I compiled using maven, it shows:
package org.scijava.plugin does not exist

May I know what's the problem and how to resolve it? 

Thanks!
Joe

Curtis Rueden

unread,
Jul 25, 2020, 12:38:56 PM7/25/20
to zwei2001, SciJava
Hi Joe,

> when I compiled using maven, it shows:
> package org.scijava.plugin does not exist

I'm guessing it's an issue with your pom.xml. Do you have the dependency:
  <dependency>
    <groupId>org.scijava</groupId>
    <artifactId>scijava-common</artifactId>
  </dependency>
?
Do you extend pom-scijava as parent?

Are you using this template as a starting point as recommended:
?

If you share your project on GitHub, we can comment more definitively.

Regards,
Curtis

--
Curtis Rueden
Software architect, LOCI/Eliceiri lab - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Have you tried the Image.sc Forum? https://forum.image.sc/



--
You received this message because you are subscribed to the Google Groups "scijava" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scijava+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scijava/b45b1e30-d67b-4aa3-9fd7-692ef51b1734o%40googlegroups.com.

zwei2001

unread,
Jul 25, 2020, 1:03:15 PM7/25/20
to scijava
Hi Curtis,

I have <dependency> as following:
 <dependencies>
        <dependency>
                <groupId>net.imagej</groupId>
                <artifactId>ij</artifactId>
        </dependency>
</dependencies>

And I have <parent> as followings:
<parent>
        <groupId>org.scijava</groupId>
                <artifactId>pom-scijava</artifactId>
                <version>26.0.0</version>
                <relativePath />
</parent>

Don't understand why above didn't work out

It's not a real project since I'm fairly new in fiji plugin. 

I just downloaded from: https://github.com/imagej/example-legacy-plugin, and jar files generated using maven. However, after I dropped the jar file into Fiji plugins, I could not see it in Fiji menu so thought maybe I should add in scijava.plugin.PlugIn, and it generates that error. Thanks!
To unsubscribe from this group and stop receiving emails from it, send an email to sci...@googlegroups.com.

Curtis Rueden

unread,
Jul 25, 2020, 3:42:15 PM7/25/20
to zhoupi...@gmail.com, SciJava
Hi Joe,

The class org.scijava.plugin.Plugin is part of org.scijava:scijava-common, the plugin framework used by ImageJ2. If you want to "import org.scijava.plugin.Plugin" in your program, then you will need scijava-common as a dependency of your project.

Are you trying to write an ImageJ1 plugin, or an ImageJ2 plugin?


For ImageJ1 plugins, see:

Lastly, be aware that the dependency net.imagej:ij is ImageJ1.

There are good reasons to develop for either version of ImageJ, but if you want to target ImageJ1, I suggest writing to the ImageJ mailing list (https://imagej.net/list.html) rather than here; this mailing list is for discussion of SciJava. Alternately, to reach a larger and more diverse audience, you can post on the Image.sc Forum (https://forum.image.sc)—there are many experts there using & developing both ImageJ1 and ImageJ2 code.

Regards,
Curtis

--
Curtis Rueden
Software architect, LOCI/Eliceiri lab - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Have you tried the Image.sc Forum? https://forum.image.sc/



To unsubscribe from this group and stop receiving emails from it, send an email to scijava+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scijava/6191b9b0-472d-4924-b55e-0189981e603fo%40googlegroups.com.

zwei2001

unread,
Jul 25, 2020, 4:21:42 PM7/25/20
to scijava
Hi Curtis,

I'm learning to write plugin in ImageJ2, i.e. Fiji. May I know if I can ask you questions about plugin afterwards? Thanks!

--Joe

On Saturday, July 25, 2020 at 3:42:15 PM UTC-4, Curtis Rueden wrote:
Hi Joe,

Curtis Rueden

unread,
Jul 25, 2020, 5:26:19 PM7/25/20
to SciJava
Hi Joe,

> May I know if I can ask you questions about plugin afterwards?

Sure. But please ask on forum.image.sc as a public topic. There are many people who will help, including myself.

Regards,
Curtis

--
Curtis Rueden
Software architect, LOCI/Eliceiri lab - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Have you tried the Image.sc Forum? https://forum.image.sc/


To unsubscribe from this group and stop receiving emails from it, send an email to scijava+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scijava/82b44064-6513-45be-bd87-390be1277045o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages