Changing the classpath of ImageJ on Windows?

How do I add to the classpath of ImageJ on Windows?

I had thought passing some options to the ImageJ-win64.exe launcher would have had an effect, but so far I see none when I go to Utilities > ImageJ properties. My only success in altering the classpath so far is by calling “java ij.ImageJ” directly.


So… I’m not the most experienced with this… but what exactly are you trying to do? What is the goal?

According to this link:

to compile and run on a Windows machine:

set CLASSPATH=.;plugins
javac ij\
javac ij\plugin\*.java
javac ij\plugin\filter\*.java
javac ij\plugin\frame\*.java
java ij.ImageJ

JDK 1.1.7 or later must be installed and the PATH updated using a command something like:

set PATH=C:\jdk1.1.7\bin;%PATH%

If you are interacting with a user via a script… you can ask them for the path to their imagej installation using Script Parameters.

But maybe I’m missing the mark here and others have a better idea what you intend to do…

1 Like

Gosh, that README is old. JDK 1.1.7 is from 1997!

What I would like to do is have a 3rd party jar on my system in the classpath for ImageJ or FIJI. I understand that I can set the environmental variable as that README suggests and invoke the java interpreter directly.

What I am trying to figure out is how to load a 3rd party jar file using the ImageJ Launcher.

It seems like some combination of one of these options should do it:

--jar-path, --jarpath, -jarpath <path>
	append .jar files in <path> to the class path
	pass -classpath <classpath> to the main() method
	call the main class with the full ImageJ class path

It seems that whatever I pass to those options the classpath does not change.

Honestly @markkitt - I’m not the best person to help you on this… but just searching through the forum in past threads, I found this:

Perhaps it’s relevant to your situation? The more info you can provide - exactly what you have tried and what errors are given - will help.

There is an issue with the launcher: Read through that and the links…

@etarena I appreciate the effort. Searching through the forums, it looks like there is probably movement away from the current C-code based launcher towards a JavaFX solution.

1 Like