Creating plugin for fiji in java using eclipse with maven build

Hi all, I am still kind of new to coding and I am trying to create a plugin in fiji that allows the user to select multiple image files for analysis, the analysis measurements they want performed, and then an export location for the results. I wrote in in java using eclipse. I did a maven build with the goal: clean install and got build success. I then opened up fiji and went to plugins>Install Plugin, then select my executable jar file from eclipse-workspace\myproject\target folder. I then get a pop-up that says the jar was installed, to close fiji and restart fiji. I do this and then go back to plugins and my project appears in the plugins drop down menu but when I click it, this is the exception I get:

(Fiji Is Just) ImageJ 2.0.0-rc-69/1.52n; Java 1.8.0_211 [64-bit]; Windows 10 10.0; 57MB of 6015MB (<1%)
 
java.lang.UnsupportedClassVersionError: File_Uploader has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at ij.IJ.runUserPlugIn(IJ.java:227)
	at ij.IJ.runPlugIn(IJ.java:193)
	at ij.Executer.runCommand(Executer.java:137)
	at ij.Executer.run(Executer.java:66)
	at java.lang.Thread.run(Thread.java:748)

I have double checked that my eclipse.ini to this same jdk (Java 1.8.0_211 ) that my fiji is using. My JAVA_HOME also points to this jdk. I also right clicked on my project in eclipse went to properties>java build path>libraries>add library>JRE system library and selected workspace default JRE(Java 1.8.0_211) . And I’ve tried JRE system library [JavaSE-1.8]. The compiler compliance level is set to 1.8 (which I thought corresponded to the Java 1.8.0_211). But, I am not sure why I am still getting this error. Also, when I open a scrip in fiji and try to open the executable jar from there I just get pop up with a bunch of random letters and symbols(pictured below).
Please any help/advice would be much appreciated!! error

Hi @jmchumney,

I think the issue is that plugin-installation works a bit differently with maven.

Could you please try the following? Enter this line in your pom file and adapt the path so that it matches your Fiji folder:

Afterwards, run mvn install either from the right click menu on the project in eclipse or from the command line.

Maven will then install the jar file of your plugin to the right folder in Fiji (you can do that by hand also, btw.). Furthermore, it will download all dependencies and the right versions of them to the Fiji folder. Consider using a separate Fiji instance for doing that, don’t use your all-day-use Fiji installation.

Let us know if that helped.

Cheers,
Robert

1 Like

I added that line into my project’s pom file and this is now my pom:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>ImageAnalysis</groupId>
  <artifactId>ImageAnalysis</artifactId>
  <packaging>jar</packaging>
  <version>0.0.1-SNAPSHOT</version>
  <description>file uploader</description>
  <build>
    <sourceDirectory>src</sourceDirectory>
    <plugins>
      <plugin>
        <inherited>true</inherited>
    	<groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.0</version>
        <configuration>
        	<encoding>UTF-8</encoding>
        	<source>1.8</source>
        	<target>1.8</target>
		</configuration>
      </plugin>
      <plugin>
      	<groupId>org.apache.maven.plugins</groupId>
      	<artifactId>maven-shade-plugin</artifactId>
      	<version>2.3</version>
      </plugin>
      <plugin>
      	<groupId>org.apache.maven.plugins</groupId>
      	<artifactId>maven-resources-plugin</artifactId>
      	<version>3.1.0</version>
        <configuration>
        	<encoding>UTF-8</encoding>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <repositories>
		<repository>
			<id>scijava.public</id>
			<url>https://maven.scijava.org/content/groups/public</url>
		</repository>
		<repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>Central Repository</name>
      <url>https://repo.maven.apache.org/maven2</url>
    </repository>
	</repositories>
	
  <properties>
  	<imagej.app.directory>C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app</imagej.app.directory>
  </properties>
  
  <dependencies>
  	<dependency>
  		<groupId>sc.fiji</groupId>
  		<artifactId>fiji-lib</artifactId>
  		<version>2.1.3-SNAPSHOT</version>
  	</dependency>
  	<dependency>
  		<groupId>io.scif</groupId>
  		<artifactId>scifio</artifactId>
  		<version>0.38.1-SNAPSHOT</version>
	</dependency>
  </dependencies>
</project>

I then right clicked my project in eclipse went to run as>maven install. I then re-opened up my fiji and my project still appeared in the plugins drop down menu but when I clicked it I still got the same exception as before.

Also, I had tried the mvn install from the command line but I got ‘mvn’ is not recognized as an internal or external command, operable program or batch file.

Regards,
Jennel

1 Like

Hey @jmchumney

would you mind sharing the pom file in a way that we can read it properly? I recommend github.com for sharing code for example. It’s otherwise super hard to spot the issue…

Cheers,
Robert

I will try to figure out how to do that. I have it in my github desktop but I am not for sure how to share from there. Again I am new to all of this. Sorry.
Hopefully this keeps its formatting.

@@ -0,0 +1,69 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>ImageAnalysis</groupId>
  <artifactId>ImageAnalysis</artifactId>
  <packaging>jar</packaging>
  <version>0.0.1-SNAPSHOT</version>
  <description>file uploader</description>
  <build>
    <sourceDirectory>src</sourceDirectory>
    <plugins>
      <plugin>
        <inherited>true</inherited>
    	<groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.0</version>
        <configuration>
        	<encoding>UTF-8</encoding>
        	<source>1.8</source>
        	<target>1.8</target>
		</configuration>
      </plugin>
      <plugin>
      	<groupId>org.apache.maven.plugins</groupId>
      	<artifactId>maven-shade-plugin</artifactId>
      	<version>2.3</version>
      </plugin>
      <plugin>
      	<groupId>org.apache.maven.plugins</groupId>
      	<artifactId>maven-resources-plugin</artifactId>
      	<version>3.1.0</version>
        <configuration>
        	<encoding>UTF-8</encoding>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <repositories>
		<repository>
			<id>scijava.public</id>
			<url>https://maven.scijava.org/content/groups/public</url>
		</repository>
		<repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>Central Repository</name>
      <url>https://repo.maven.apache.org/maven2</url>
    </repository>
	</repositories>
	
  <properties>
  	<package-name>fileuploader</package-name>
  	<imagej.app.directory>C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\</imagej.app.directory>
  </properties>
  
  <dependencies>
  	<dependency>
  		<groupId>sc.fiji</groupId>
  		<artifactId>fiji-lib</artifactId>
  		<version>2.1.3-SNAPSHOT</version>
  	</dependency>
  	<dependency>
  		<groupId>io.scif</groupId>
  		<artifactId>scifio</artifactId>
  		<version>0.38.1-SNAPSHOT</version>
	</dependency>
  </dependencies>
</project>
1 Like

Hey @jmchumney,

ok, I see a couple of issues in the pom. In order to have a pom which is compatible with Fiji, you need to have a parent pom specified, as here:

You will then realise that maven complains about other entries missing in your pom file. I suggest having a look at this video (especially 5:20 - 7:30) in order to learn how to write a proper pom.xml for Fiji plugins:

I hope that helps. If there are any issues left, please let us know :wink:

Cheers,
Robert

1 Like

I have made lots of changes to my pom file. The updated version is below.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  
  <parent>
    <groupId>org.scijava</groupId>
    <artifactId>pom-scijava</artifactId>
    <version>26.0.0</version>
  </parent>
  
  <groupId>com.sherifelbasiounylab.imageanalysis</groupId>
  <artifactId>ImageAnalysis</artifactId>
  <packaging>jar</packaging>
  <version>1</version>
  
  <name>File Uploader</name>
  <description>File uploader for image analysis.</description>
  <url>com.sherifelbasioiunylab</url>
  <inceptionYear>2019</inceptionYear>
  <organization>
  	<name>N.E.R.D. Lab</name>
  </organization>
  <licenses>
  	<license>
  		<name>Apache License, Version 2.0</name>
    	<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
    	<distribution>repo</distribution>
    	<comments>A business-friendly OSS license</comments>
   	</license>
  </licenses>
  <developers>
  	<developer>
      <id>w429jmc</id>
      <name>Jennel</name>
     </developer>
  </developers>
  <contributors>
  	<contributor>
  		<name>none</name>
  	</contributor>
  </contributors>
  <mailingLists>
    <mailingList>
      <name>User List</name>
      <subscribe>user-subscribe@127.0.0.1</subscribe>
      <unsubscribe>user-unsubscribe@127.0.0.1</unsubscribe>
      <post>user@127.0.0.1</post>
      <archive>http://127.0.0.1/user/</archive>
      <otherArchives>
        <otherArchive>http://base.google.com/base/1/127.0.0.1</otherArchive>
      </otherArchives>
    </mailingList>
  </mailingLists>
  <scm>
    <connection>scm:svn:http://127.0.0.1/svn/my-project</connection>
    <developerConnection>scm:svn:https://127.0.0.1/svn/my-project</developerConnection>
    <tag>HEAD</tag>
    <url>http://127.0.0.1/websvn/my-project</url>
  </scm>
  <issueManagement>
    <system>Bugzilla</system>
    <url>http://127.0.0.1/bugzilla/</url>
  </issueManagement>
  <ciManagement>
    <system>continuum</system>
    <url>http://127.0.0.1:8080/continuum</url>
    <notifiers>
      <notifier>
        <type>mail</type>
        <sendOnError>true</sendOnError>
        <sendOnFailure>true</sendOnFailure>
        <sendOnSuccess>false</sendOnSuccess>
        <sendOnWarning>false</sendOnWarning>
        <configuration><address>continuum@127.0.0.1</address></configuration>
      </notifier>
    </notifiers>
  </ciManagement>
  
  <build>
    <sourceDirectory>src</sourceDirectory>
    <plugins>
      <plugin>
        <inherited>true</inherited>
    	<groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
        	<encoding>UTF-8</encoding>
        	<source>1.8</source>
        	<target>1.8</target>
		</configuration>
      </plugin>
      <plugin>
      	<groupId>org.apache.maven.plugins</groupId>
      	<artifactId>maven-shade-plugin</artifactId>
      	<version>2.3</version>
      </plugin>
      <plugin>
      	<groupId>org.apache.maven.plugins</groupId>
      	<artifactId>maven-resources-plugin</artifactId>
      	<configuration>
        	<encoding>UTF-8</encoding>
        </configuration>
      </plugin>
     </plugins>
  </build>
  <repositories>
		<repository>
			<id>scijava.public</id>
			<url>https://maven.scijava.org/content/groups/public</url>
		</repository>
		<repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>Central Repository</name>
      <url>https://repo.maven.apache.org/maven2</url>
    </repository>
	</repositories>
	
  <properties>
  	<package-name>fileuploader</package-name>
  	<scijava.app.directory>C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\</scijava.app.directory>
  	<license.licenseName>Apache License</license.licenseName>
  	<license.copyrightOwners>Jennel</license.copyrightOwners>
  </properties>
  
  <dependencies>
  	<dependency>
  		<groupId>sc.fiji</groupId>
  		<artifactId>fiji-lib</artifactId>
  		</dependency>
  	<dependency>
  		<groupId>io.scif</groupId>
  		<artifactId>scifio</artifactId>
  		</dependency>
  </dependencies>
</project>

However, I am no longer getting build success. The following is what the console is saying.

--- scijava-maven-plugin:1.1.0:copy-jars (copy-jars) @ ImageAnalysis ---
[INFO] At least one scijava.* property is set. Ignoring imagej.* properties
[INFO] No property name for the scijava.app.subdirectory directory location was specified; Installing in default location
[INFO] Copying ImageAnalysis-1.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[INFO] Copying fiji-lib-2.1.2.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  5.224 s
[INFO] Finished at: 2019-06-20T15:37:27-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.scijava:scijava-maven-plugin:1.1.0:copy-jars (copy-jars) on project ImageAnalysis: Couldn't download artifact sc.fiji:fiji-lib:jar:2.1.2: C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars\fiji-lib-2.1.2.jar: The process cannot access the file because it is being used by another process. -> [Help 1]
[ERROR] 

Please help! Thanks!
-Jennel

1 Like

Close Fiji :wink: Maven cannot overwrite a file because Fiji is running. :slight_smile:

Thank you I was able to get a build success now with maven install. I re-opened fiji and my project was still in the plugins drop down menu but when I clicked it, I am still getting the following error.

(Fiji Is Just) ImageJ 2.0.0-rc-69/1.52n; Java 1.8.0_211 [64-bit]; Windows 10 10.0; 58MB of 6015MB (<1%)
 
java.lang.UnsupportedClassVersionError: File_Uploader has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at ij.IJ.runUserPlugIn(IJ.java:227)
	at ij.IJ.runPlugIn(IJ.java:193)
	at ij.Executer.runCommand(Executer.java:137)
	at ij.Executer.run(Executer.java:66)
	at java.lang.Thread.run(Thread.java:748)

Hm. Class file version 55 means that it was compiled with Java 11. Is there an option for which SDK or JDK to use in Eclipse? I’m not so familiar with Eclipse.

How about this trick?
https://www.mkyong.com/maven/how-to-tell-maven-to-use-java-8/

I tried both of those changes and am still getting the same error in fiji.
Should I try deleting the plugin from fiji all together and then try rebuilding it in eclipse? Could fiji be saving past build stuff?

When I try to open the newly configured jar file from a fiji script, the following dialog and error are what pops up.
error2

When I do a maven install in eclipse this is what the console displays:

[INFO] Scanning for projects...
[INFO] 
[INFO] --------< com.sherifelbasiounylab.imageanalysis:Image_Analysis >--------
[INFO] Building File Uploader 1
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-rules) @ Image_Analysis ---
[INFO] Adding ignore: module-info
[INFO] Adding ignore: META-INF/versions/*/module-info
[INFO] Adding ignore: org.apache.hadoop.yarn.*.package-info
[INFO] Adding ignore: org.apache.spark.unused.UnusedStubClass
[INFO] Adding ignore: org.hibernate.stat.ConcurrentStatisticsImpl
[INFO] Adding ignore: org.junit.runner.Runner
[INFO] Adding ignore: module-info
[INFO] 
[INFO] --- build-helper-maven-plugin:3.0.0:regex-property (sanitize-version) @ Image_Analysis ---
[INFO] No match to regex '^([0-9]+)\.([0-9]+)\.([0-9]+).*$' found in '1'. The initial value '1' is left as-is...
[INFO] 
[INFO] --- buildnumber-maven-plugin:1.4:create (default) @ Image_Analysis ---
[INFO] Executing: cmd.exe /X /C "svn --non-interactive info"
[INFO] Working directory: C:\Users\w429jmc\git\file-uploader\Image_Analysis
[WARNING] Cannot get the revision information from the scm repository, proceeding with revision of UNKNOWN : 
Exception while executing SCM command.
[INFO] Storing buildNumber: UNKNOWN at timestamp: 1561069883303
[INFO] Executing: cmd.exe /X /C "svn --non-interactive info"
[INFO] Working directory: C:\Users\w429jmc\git\file-uploader\Image_Analysis
[WARNING] Cannot get the branch information from the scm repository, proceeding with UNKNOWN_BRANCH : 
Exception while executing SCM command.
[INFO] Storing buildScmBranch: UNKNOWN_BRANCH
[INFO] 
[INFO] --- scijava-maven-plugin:1.1.0:set-rootdir (set-rootdir) @ Image_Analysis ---
[INFO] Setting rootdir: C:\Users\w429jmc\git\file-uploader\Image_Analysis
[INFO] 
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ Image_Analysis ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\w429jmc\git\file-uploader\Image_Analysis\src\main\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ Image_Analysis ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ Image_Analysis ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\w429jmc\git\file-uploader\Image_Analysis\src\test\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) @ Image_Analysis ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.21.0:test (default-test) @ Image_Analysis ---
[INFO] 
[INFO] --- maven-jar-plugin:3.1.0:jar (default-jar) @ Image_Analysis ---
[INFO] Building jar: C:\Users\w429jmc\git\file-uploader\Image_Analysis\target\Image_Analysis-1.jar
[INFO] 
[INFO] >>> maven-source-plugin:3.0.1:jar (attach-sources) > generate-sources @ Image_Analysis >>>
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-rules) @ Image_Analysis ---
[INFO] Adding ignore: module-info
[INFO] Adding ignore: META-INF/versions/*/module-info
[INFO] Adding ignore: org.apache.hadoop.yarn.*.package-info
[INFO] Adding ignore: org.apache.spark.unused.UnusedStubClass
[INFO] Adding ignore: org.hibernate.stat.ConcurrentStatisticsImpl
[INFO] Adding ignore: org.junit.runner.Runner
[INFO] Adding ignore: module-info
[INFO] 
[INFO] --- build-helper-maven-plugin:3.0.0:regex-property (sanitize-version) @ Image_Analysis ---
[INFO] No match to regex '^([0-9]+)\.([0-9]+)\.([0-9]+).*$' found in '1'. The initial value '1' is left as-is...
[INFO] 
[INFO] --- buildnumber-maven-plugin:1.4:create (default) @ Image_Analysis ---
[INFO] 
[INFO] --- scijava-maven-plugin:1.1.0:set-rootdir (set-rootdir) @ Image_Analysis ---
[INFO] 
[INFO] <<< maven-source-plugin:3.0.1:jar (attach-sources) < generate-sources @ Image_Analysis <<<
[INFO] 
[INFO] 
[INFO] --- maven-source-plugin:3.0.1:jar (attach-sources) @ Image_Analysis ---
[INFO] Building jar: C:\Users\w429jmc\git\file-uploader\Image_Analysis\target\Image_Analysis-1-sources.jar
[INFO] 
[INFO] --- maven-jar-plugin:3.1.0:test-jar (default) @ Image_Analysis ---
[INFO] Skipping packaging of the test-jar
[INFO] 
[INFO] --- maven-failsafe-plugin:2.21.0:integration-test (default) @ Image_Analysis ---
[INFO] 
[INFO] --- maven-failsafe-plugin:2.21.0:verify (default) @ Image_Analysis ---
[INFO] 
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ Image_Analysis ---
[INFO] Installing C:\Users\w429jmc\git\file-uploader\Image_Analysis\target\Image_Analysis-1.jar to C:\Users\w429jmc\.m2\repository\com\sherifelbasiounylab\imageanalysis\Image_Analysis\1\Image_Analysis-1.jar
[INFO] Installing C:\Users\w429jmc\git\file-uploader\Image_Analysis\pom.xml to C:\Users\w429jmc\.m2\repository\com\sherifelbasiounylab\imageanalysis\Image_Analysis\1\Image_Analysis-1.pom
[INFO] Installing C:\Users\w429jmc\git\file-uploader\Image_Analysis\target\Image_Analysis-1-sources.jar to C:\Users\w429jmc\.m2\repository\com\sherifelbasiounylab\imageanalysis\Image_Analysis\1\Image_Analysis-1-sources.jar
[INFO] 
[INFO] --- scijava-maven-plugin:1.1.0:copy-jars (copy-jars) @ Image_Analysis ---
[INFO] At least one scijava.* property is set. Ignoring imagej.* properties
[INFO] No property name for the scijava.app.subdirectory directory location was specified; Installing in default location
[INFO] Copying Image_Analysis-1.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[INFO] Copying fiji-lib-2.1.2.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[WARNING] Found other version that is incompatible according to SemVer: 1.52n
[INFO] A newer version for ij-1.52i.jar was detected; skipping
[INFO] Copying ij1-patcher-0.12.9.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[INFO] Copying javassist-3.24.0-GA.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[INFO] Copying scifio-0.37.3.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[INFO] Copying scifio-jai-imageio-1.1.1.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[INFO] Copying imagej-common-0.28.2.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[INFO] Copying imglib2-roi-0.7.0.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[INFO] Copying imglib2-realtransform-2.1.0.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[INFO] Copying jama-1.0.3.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[INFO] Copying jitk-tps-3.0.0.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[WARNING] Found other version that is incompatible according to SemVer: 0.25
[INFO] A newer version for ejml-0.24.jar was detected; skipping
[INFO] Copying log4j-1.2.17.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[INFO] Copying trove4j-3.0.3.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[INFO] Copying scijava-table-0.4.0.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[INFO] Copying udunits-4.3.18.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[INFO] Copying imglib2-5.6.3.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[INFO] Copying imglib2-cache-1.0.0-beta-11.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[INFO] Copying caffeine-2.4.0.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[INFO] Copying scijava-common-2.77.0.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[INFO] Copying parsington-1.0.4.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[INFO] Copying eventbus-1.4.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\jars
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  6.215 s
[INFO] Finished at: 2019-06-20T18:31:26-04:00
[INFO] ------------------------------------------------------------------------
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding="UTF-8"

I then open up fiji go to plugins>install plugin and select this file (C:\Users\w429jmc\git\file-uploader\Image_Analysis\target\Image_Analysis-1.jar) since it was listed in the console. Then restart fiji and my project doesn’t show up in the plugins menu. I then go to plugins>install plugin again and this time select(C:\Users\w429jmc\git\file-uploader\Image_Analysis\target\classes\fileuploader\File_Uploader.class). Once I restart fiji again File Uploader appears in the plugins drop down menu but then when I click it I get the following error.
error3
Any help would be much appreciated!!
Thanks!!

We’re defining Java 8 as a target version in the parent pom-scijava-base:

If your class gets built against Java 11, that must be because you’re somehow overriding it in your POM.

What’s the output when you run:

mvn clean install

… from the command line?


EDIT:

Note that with recent versions of the scijava-maven-plugin, the recommended (and more future-proof) way to define this is using scijava instead of imagej:

<scijava.app.directory>C:/programs/fiji-win64/Fiji.app/</scijava.app.directory>

Moreover, I’d personally recommend to not specify this in the pom.xml (as this creates problems when collaborating on a project across different systems and platforms, because the path defined here will be different on those), but instead include it in your mvn command (either from CLI or from your IDE):

mvn -Dscijava.app.directory=C:/programs/fiji-win64/Fiji.app
1 Like

This is what I get when I run mvn clean install from the command line.


C:\Users\w429jmc\git\file-uploader\Image_Analysis>mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] --------< com.sherifelbasiounylab.imageanalysis:Image_Analysis >--------
[INFO] Building File Uploader 1
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ Image_Analysis ---
[INFO] Deleting C:\Users\w429jmc\git\file-uploader\Image_Analysis\target
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-rules) @ Image_Analysis
---
[INFO] Adding ignore: module-info
[INFO] Adding ignore: META-INF/versions/*/module-info
[INFO] Adding ignore: org.apache.hadoop.yarn.*.package-info
[INFO] Adding ignore: org.apache.spark.unused.UnusedStubClass
[INFO] Adding ignore: org.hibernate.stat.ConcurrentStatisticsImpl
[INFO] Adding ignore: org.junit.runner.Runner
[INFO] Adding ignore: module-info
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:regex-property (sanitize-version) @ I
mage_Analysis ---
[INFO] No match to regex '^([0-9]+)\.([0-9]+)\.([0-9]+).*$' found in '1'. The in
itial value '1' is left as-is...
[INFO]
[INFO] --- buildnumber-maven-plugin:1.4:create (default) @ Image_Analysis ---
[INFO] Executing: cmd.exe /X /C "svn --non-interactive info"
[INFO] Working directory: C:\Users\w429jmc\git\file-uploader\Image_Analysis
[WARNING] Cannot get the revision information from the scm repository, proceedin
g with revision of UNKNOWN :
Exception while executing SCM command.
[INFO] Storing buildNumber: UNKNOWN at timestamp: 1561152161063
[INFO] Executing: cmd.exe /X /C "svn --non-interactive info"
[INFO] Working directory: C:\Users\w429jmc\git\file-uploader\Image_Analysis
[WARNING] Cannot get the branch information from the scm repository, proceeding
with UNKNOWN_BRANCH :
Exception while executing SCM command.
[INFO] Storing buildScmBranch: UNKNOWN_BRANCH
[INFO]
[INFO] --- scijava-maven-plugin:1.1.0:set-rootdir (set-rootdir) @ Image_Analysis
 ---
[INFO] Setting rootdir: C:\Users\w429jmc\git\file-uploader\Image_Analysis
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ Image_An
alysis ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\w429jmc\git\file-uploader\Im
age_Analysis\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ Image_Analysi
s ---
[INFO] Compiling 1 source file to C:\Users\w429jmc\git\file-uploader\Image_Analy
sis\target\classes
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @
Image_Analysis ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\w429jmc\git\file-uploader\Im
age_Analysis\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) @ Image
_Analysis ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.21.0:test (default-test) @ Image_Analysis ---

[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:3.1.0:jar (default-jar) @ Image_Analysis ---
[INFO] Building jar: C:\Users\w429jmc\git\file-uploader\Image_Analysis\target\Im
age_Analysis-1.jar
[INFO]
[INFO] >>> maven-source-plugin:3.0.1:jar (attach-sources) > generate-sources @ I
mage_Analysis >>>
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-rules) @ Image_Analysis
---
[INFO] Adding ignore: module-info
[INFO] Adding ignore: META-INF/versions/*/module-info
[INFO] Adding ignore: org.apache.hadoop.yarn.*.package-info
[INFO] Adding ignore: org.apache.spark.unused.UnusedStubClass
[INFO] Adding ignore: org.hibernate.stat.ConcurrentStatisticsImpl
[INFO] Adding ignore: org.junit.runner.Runner
[INFO] Adding ignore: module-info
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:regex-property (sanitize-version) @ I
mage_Analysis ---
[INFO] No match to regex '^([0-9]+)\.([0-9]+)\.([0-9]+).*$' found in '1'. The in
itial value '1' is left as-is...
[INFO]
[INFO] --- buildnumber-maven-plugin:1.4:create (default) @ Image_Analysis ---
[INFO]
[INFO] --- scijava-maven-plugin:1.1.0:set-rootdir (set-rootdir) @ Image_Analysis
 ---
[INFO]
[INFO] <<< maven-source-plugin:3.0.1:jar (attach-sources) < generate-sources @ I
mage_Analysis <<<
[INFO]
[INFO]
[INFO] --- maven-source-plugin:3.0.1:jar (attach-sources) @ Image_Analysis ---
[INFO] Building jar: C:\Users\w429jmc\git\file-uploader\Image_Analysis\target\Im
age_Analysis-1-sources.jar
[INFO]
[INFO] --- maven-jar-plugin:3.1.0:test-jar (default) @ Image_Analysis ---
[INFO] Skipping packaging of the test-jar
[INFO]
[INFO] --- maven-failsafe-plugin:2.21.0:integration-test (default) @ Image_Analy
sis ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-failsafe-plugin:2.21.0:verify (default) @ Image_Analysis ---
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ Image_Analysis
 ---
[INFO] Installing C:\Users\w429jmc\git\file-uploader\Image_Analysis\target\Image
_Analysis-1.jar to C:\Users\w429jmc\.m2\repository\com\sherifelbasiounylab\image
analysis\Image_Analysis\1\Image_Analysis-1.jar
[INFO] Installing C:\Users\w429jmc\git\file-uploader\Image_Analysis\pom.xml to C
:\Users\w429jmc\.m2\repository\com\sherifelbasiounylab\imageanalysis\Image_Analy
sis\1\Image_Analysis-1.pom
[INFO] Installing C:\Users\w429jmc\git\file-uploader\Image_Analysis\target\Image
_Analysis-1-sources.jar to C:\Users\w429jmc\.m2\repository\com\sherifelbasiounyl
ab\imageanalysis\Image_Analysis\1\Image_Analysis-1-sources.jar
[INFO]
[INFO] --- scijava-maven-plugin:1.1.0:copy-jars (copy-jars) @ Image_Analysis ---

[INFO] At least one scijava.* property is set. Ignoring imagej.* properties
[INFO] No property name for the scijava.app.subdirectory directory location was
specified; Installing in default location
[INFO] Copying Image_Analysis-1.jar to C:\Users\w429jmc\Development\fiji-win64 (
1)\Fiji.app\jars
[INFO] Copying fiji-lib-2.1.2.jar to C:\Users\w429jmc\Development\fiji-win64 (1)
\Fiji.app\jars
[WARNING] Found other version that is incompatible according to SemVer: 1.52n
[INFO] A newer version for ij-1.52i.jar was detected; skipping
[INFO] Copying ij1-patcher-0.12.9.jar to C:\Users\w429jmc\Development\fiji-win64
 (1)\Fiji.app\jars
[INFO] Copying javassist-3.24.0-GA.jar to C:\Users\w429jmc\Development\fiji-win6
4 (1)\Fiji.app\jars
[INFO] Copying scifio-0.37.3.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\
Fiji.app\jars
[INFO] Copying scifio-jai-imageio-1.1.1.jar to C:\Users\w429jmc\Development\fiji
-win64 (1)\Fiji.app\jars
[INFO] Copying imagej-common-0.28.2.jar to C:\Users\w429jmc\Development\fiji-win
64 (1)\Fiji.app\jars
[INFO] Copying imglib2-roi-0.7.0.jar to C:\Users\w429jmc\Development\fiji-win64
(1)\Fiji.app\jars
[INFO] Copying imglib2-realtransform-2.1.0.jar to C:\Users\w429jmc\Development\f
iji-win64 (1)\Fiji.app\jars
[INFO] Copying jama-1.0.3.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\Fij
i.app\jars
[INFO] Copying jitk-tps-3.0.0.jar to C:\Users\w429jmc\Development\fiji-win64 (1)
\Fiji.app\jars
[WARNING] Found other version that is incompatible according to SemVer: 0.25
[INFO] A newer version for ejml-0.24.jar was detected; skipping
[INFO] Copying log4j-1.2.17.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\F
iji.app\jars
[INFO] Copying trove4j-3.0.3.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\
Fiji.app\jars
[INFO] Copying scijava-table-0.4.0.jar to C:\Users\w429jmc\Development\fiji-win6
4 (1)\Fiji.app\jars
[INFO] Copying udunits-4.3.18.jar to C:\Users\w429jmc\Development\fiji-win64 (1)
\Fiji.app\jars
[INFO] Copying imglib2-5.6.3.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\
Fiji.app\jars
[INFO] Copying imglib2-cache-1.0.0-beta-11.jar to C:\Users\w429jmc\Development\f
iji-win64 (1)\Fiji.app\jars
[INFO] Copying caffeine-2.4.0.jar to C:\Users\w429jmc\Development\fiji-win64 (1)
\Fiji.app\jars
[INFO] Copying scijava-common-2.77.0.jar to C:\Users\w429jmc\Development\fiji-wi
n64 (1)\Fiji.app\jars
[INFO] Copying parsington-1.0.4.jar to C:\Users\w429jmc\Development\fiji-win64 (
1)\Fiji.app\jars
[INFO] Copying eventbus-1.4.jar to C:\Users\w429jmc\Development\fiji-win64 (1)\F
iji.app\jars
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  12.074 s
[INFO] Finished at: 2019-06-21T17:22:47-04:00
[INFO] ------------------------------------------------------------------------

C:\Users\w429jmc\git\file-uploader\Image_Analysis>

C:\Users\w429jmc\git\file-uploader\Image_Analysis>^A

But, when I try to open it in fiji I still get the following error:

and I had even added this line to the properties section of my pom file.

<scijava.jvm.build.version>[1.8.0-101,1.8.9999]</scijava.jvm.build.version>

Would you mind sharing the full code so that we can try to reproduce the error?

Here is the .java file

package fileuploader;

import java.awt.*;
import java.awt.EventQueue;
import javax.swing.JPanel;

import org.scijava.command.Command;
import org.scijava.plugin.Plugin;

import ij.plugin.PlugIn;
import javax.swing.JFileChooser;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import javax.swing.JLabel;
import java.awt.Button;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.TextArea;
import java.awt.Checkbox;
import java.awt.TextField;

@Plugin(type = Command.class, menuPath = "Plugins>File_Uploader")
public class File_Uploader{
//public class File_Uploader implements PlugIn {

	private final JFileChooser openFileChooser;
	private final JFileChooser saveLocation;
	private static Dialog contentPane;
	private final TextArea exportLocation = new TextArea();
	private File[] Files;
	private ArrayList[] pathList;

	
	//Creates the frame. 
	File_Uploader() {
	
		Frame gui = new Frame(); 
		
		contentPane = new Dialog(gui , "Image Analysis", true); 
		//Panel contentPane = new Panel(); 
		
		//contentPane.setName("Image Analysis");
		contentPane.setBounds(100, 100, 527, 427);
		
		//contentPane.setBorder(null);
		//setContentPane(contentPane);
		contentPane.setLayout(null);
		
		Button browseBtn1 = new Button("Browse...");
		browseBtn1.setBounds(410, 41, 66, 21);
		contentPane.add(browseBtn1);
		
		TextArea textArea = new TextArea();
		textArea.setEditable(false);
		textArea.setBounds(10, 29, 394, 51);
		contentPane.add(textArea);
		
		JLabel selectFilesLabel = new JLabel("Select image files:");
		selectFilesLabel.setBounds(10, 10, 102, 13);
		contentPane.add(selectFilesLabel);
		
		JLabel selectMeasurementsLabel = new JLabel("Select measurements to be included in analysis :");
		selectMeasurementsLabel.setBounds(10, 78, 321, 21);
		contentPane.add(selectMeasurementsLabel);
		
		Checkbox volumeCheckbox = new Checkbox("Cell Volume");
		volumeCheckbox.setBounds(10, 105, 90, 21);
		contentPane.add(volumeCheckbox);
		
		Checkbox cellAreaCheckbox = new Checkbox("Surface Area of Cell");
		cellAreaCheckbox.setBounds(10, 132, 141, 21);
		contentPane.add(cellAreaCheckbox);
		
		Checkbox densityCheckbox = new Checkbox("Cell Count Density");
		densityCheckbox.setBounds(10, 159, 141, 21);
		contentPane.add(densityCheckbox);
		
		Checkbox intensityCheckbox = new Checkbox("Intensity of Cells");
		intensityCheckbox.setBounds(10, 186, 127, 21);
		contentPane.add(intensityCheckbox);
		
		Checkbox clcusterCountCheckbox = new Checkbox("Cluster Count Per Cell");
		clcusterCountCheckbox.setBounds(185, 159, 164, 21);
		contentPane.add(clcusterCountCheckbox);
		
		Checkbox sk2Checkbox = new Checkbox("Sk2 +/-");
		sk2Checkbox.setBounds(185, 105, 90, 21);
		contentPane.add(sk2Checkbox);
		
		Checkbox sk3Checkbox = new Checkbox("Sk3 +/-");
		sk3Checkbox.setBounds(185, 132, 90, 21);
		contentPane.add(sk3Checkbox);
		
		Checkbox clusterAreaCheckbox = new Checkbox("Cluster Area");
		clusterAreaCheckbox.setBounds(185, 186, 90, 21);
		contentPane.add(clusterAreaCheckbox);
		
		JLabel selectExportLabel = new JLabel("Select export location for Excel file of results:");
		selectExportLabel.setBounds(10, 223, 290, 13);
		contentPane.add(selectExportLabel);
		exportLocation.setEditable(false);
		exportLocation.setBounds(10, 242, 394, 37);
		contentPane.add(exportLocation);
		
		Button browseBtn2 = new Button("Browse...");
		browseBtn2.setBounds(410, 242, 66, 21);
		contentPane.add(browseBtn2);
		
		JLabel lblNewLabel = new JLabel("Enter filename for Excel file:");
		lblNewLabel.setBounds(10, 295, 189, 13);
		contentPane.add(lblNewLabel);
		
		TextField filenameTextField = new TextField();
		filenameTextField.setBounds(10, 314, 339, 21);
		contentPane.add(filenameTextField);
				
		Button submitBtn = new Button("Submit");
		submitBtn.setBounds(283, 359, 66, 21);
		contentPane.add(submitBtn);
		
		Button cancelBtn = new Button("Cancel");
		cancelBtn.setBounds(376, 359, 79, 21);
		contentPane.add(cancelBtn);
		
		//Set-up for 1st browse button
		openFileChooser = new JFileChooser();
		openFileChooser.setMultiSelectionEnabled(true); //allows for multiple files to be selected at once
		openFileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); //only allows for files to be selected (no directories)
		
		//Action event for the 1st browse button
		browseBtn1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				
				//if the 1st browse button is clicked
				if (e.getSource() == browseBtn1) {
					//opens file chooser dialog box
					int returnValue = openFileChooser.showDialog(contentPane, null);
					
					if (returnValue == JFileChooser.APPROVE_OPTION) {
						File[] files = openFileChooser.getSelectedFiles();
						//adds the paths for the selected files to the text area
						for (File i : files) {
							textArea.append(i+";" + "\n"); //each path on their own line and separated by a ;
						}
					}
				}
			}
		});	
		
		
		//Set-up for 2nd browse button
		saveLocation = new JFileChooser();
		saveLocation.setMultiSelectionEnabled(false); //allows for only one directory to be selected
		saveLocation.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); //only allows for the selection of a directory (not a file)
		
		
		//Action event for the 2nd browse button
		browseBtn2.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				
				//if the 2nd browse button is clicked
				if (e.getSource() == browseBtn2) {
					int returnValue = saveLocation.showDialog(contentPane, null);
					
					if (returnValue == JFileChooser.APPROVE_OPTION) {
						File directory = saveLocation.getSelectedFile();
						//adds the location of the export directory to the text area
						exportLocation.setText(directory.getAbsolutePath()+"\\");
					
					}
				}
			}
		});	
		
		//Action event for submit button		
		submitBtn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
			
				//if the submit button is clicked
				if (e.getSource() == submitBtn) {
					
					File[] files = openFileChooser.getSelectedFiles();
					Arrays.asList(files).forEach(x->{
						String path = x.getAbsolutePath();
						//pathList.add(path);
					});
				
					//prints the list of image files selected for analysis to the console
					System.out.println("Images for Analysis:");
					System.out.println(pathList);
					
					/*File[] files = openFileChooser.getSelectedFiles();
					Arrays.asList(files).forEach(x->{
					String path = x.getAbsolutePath();
					System.out.println("Images for Analysis:");
					//prints the list of image files selected for analysis to the console
					System.out.println(path);
					});*/
					
					String exportPath = exportLocation.getText()+filenameTextField.getText();
					System.out.println("Export Location for Results:");
					//prints the complete export path for the results to the console
					System.out.println(exportPath);
					
					contentPane.dispose();//closes window
				}
			}
		});
		
		//Action event for cancel button
		cancelBtn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				
				//if the cancel button is clicked
				if (e.getSource() == cancelBtn) {
					
					contentPane.dispose(); //closes window
				}
			}
		});	
		
		//gui.add(contentPane);
		contentPane.setVisible(true);
	}
	/*
	protected void dispose() {
		// TODO Auto-generated method stub
		
	}

	//Launches the application.
		public static void main(String[] args) {
					EventQueue.invokeLater(new Runnable() {
				public void run() {
					try {
						new File_Uploader();
					} catch (Exception e) {
						e.printStackTrace();
					}
				}
			});
		
		}

		@Override
		public void run(String arg) {
			// TODO Auto-generated method stub
			
		}
		*/
	
	public static void main(String args[])  
    {  
        new File_Uploader();  
    }

	/*@Override
	public void run(String arg) {
		// TODO Auto-generated method stub
		
	}  
	*/
		
};

And here is the pom file

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  
  <parent>
    <groupId>org.scijava</groupId>
    <artifactId>pom-scijava</artifactId>
    <version>26.0.0</version>
  </parent>
  
  <groupId>com.sherifelbasiounylab.imageanalysis</groupId>
  <artifactId>Image_Analysis</artifactId>
  <packaging>jar</packaging>
  <version>1</version>
  
  <name>File Uploader</name>
  <description>File uploader for image analysis.</description>
  <url>com.sherifelbasioiunylab</url>
  <inceptionYear>2019</inceptionYear>
  <organization>
  	<name>N.E.R.D. Lab</name>
  </organization>
  <licenses>
  	<license>
  		<name>Apache License, Version 2.0</name>
    	<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
    	<distribution>repo</distribution>
    	<comments>A business-friendly OSS license</comments>
   	</license>
  </licenses>
  <developers>
  	<developer>
      <id>w429jmc</id>
      <name>Jennel</name>
     </developer>
  </developers>
  <contributors>
  	<contributor>
  		<name>none</name>
  	</contributor>
  </contributors>
  <mailingLists>
    <mailingList>
      <name>User List</name>
      <subscribe>user-subscribe@127.0.0.1</subscribe>
      <unsubscribe>user-unsubscribe@127.0.0.1</unsubscribe>
      <post>user@127.0.0.1</post>
      <archive>http://127.0.0.1/user/</archive>
      <otherArchives>
        <otherArchive>http://base.google.com/base/1/127.0.0.1</otherArchive>
      </otherArchives>
    </mailingList>
  </mailingLists>
  <scm>
    <connection>scm:svn:http://127.0.0.1/svn/my-project</connection>
    <developerConnection>scm:svn:https://127.0.0.1/svn/my-project</developerConnection>
    <tag>HEAD</tag>
    <url>http://127.0.0.1/websvn/my-project</url>
  </scm>
  <issueManagement>
    <system>Bugzilla</system>
    <url>http://127.0.0.1/bugzilla/</url>
  </issueManagement>
  <ciManagement>
    <system>continuum</system>
    <url>http://127.0.0.1:8080/continuum</url>
    <notifiers>
      <notifier>
        <type>mail</type>
        <sendOnError>true</sendOnError>
        <sendOnFailure>true</sendOnFailure>
        <sendOnSuccess>false</sendOnSuccess>
        <sendOnWarning>false</sendOnWarning>
        <configuration><address>continuum@127.0.0.1</address></configuration>
      </notifier>
    </notifiers>
  </ciManagement>
  
  <build>
    <sourceDirectory>src</sourceDirectory>
    <plugins>
       <plugin>
       	<groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
        	<source>1.8</source>
            <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
      	<groupId>org.apache.maven.plugins</groupId>
      	<artifactId>maven-shade-plugin</artifactId>
      	<version>2.3</version>
      </plugin>
      <plugin>
      	<groupId>org.apache.maven.plugins</groupId>
      	<artifactId>maven-resources-plugin</artifactId>
      	<configuration>
        	<encoding>UTF-8</encoding>
        </configuration>
      </plugin>
     </plugins>
  </build>
  <repositories>
		<repository>
			<id>scijava.public</id>
			<url>https://maven.scijava.org/content/groups/public</url>
		</repository>
		<repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>Central Repository</name>
      <url>https://repo.maven.apache.org/maven2</url>
    </repository>
	</repositories>
	
  <properties>
  	<package-name>fileuploader</package-name>
  	<scijava.app.directory>C:\Users\w429jmc\Development\fiji-win64 (1)\Fiji.app\</scijava.app.directory>
    <scijava.jvm.build.version>[1.8.0-101,1.8.9999]</scijava.jvm.build.version>
  	<license.licenseName>Apache License</license.licenseName>
  	<license.copyrightOwners>Jennel</license.copyrightOwners>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.compiler.source>1.8</maven.compiler.source>
  </properties>
  
  <dependencies>
  	<dependency>
  		<groupId>sc.fiji</groupId>
  		<artifactId>fiji-lib</artifactId>
  		</dependency>
  	<dependency>
  		<groupId>io.scif</groupId>
  		<artifactId>scifio</artifactId>
  		</dependency>
  </dependencies>
</project>

But, I removed the JRE library from the properties of my project in Eclipse and re-added it and this is now the error I get when I try to run the plugin in fiji.

error5

Hey @jmchumney,

sorry for being imprecise… I meant the whole project. We developers like to exchange full projects, e.g. via github, because we can just download the whole thing, check why it’s not working, try some things and upload our changes and send them back. I show you from the other perspective:

https://github.com/imagej/example-imagej-command

If you download this repository (the whole folder), you have a fully functional Fiji plugin, as in the video linked above. This thing compiles correctly basically always on all computers which have maven and Java installed. I’m happy to compare it to your project and find out what’s different, but therefore we need the whole project - ideally as github repository :wink:

Cheers,
Robert