I'm using ImageJ for image processing for a class, and I've been creating small plugins for a few weeks. It's been frustrating for me because I never saw any java error messages, such as syntax error on line 3 blah blah. When my plugins don't compile (due to some compile time error), all I see is "class not found", or if a plugin had compiled in the past and there is a class file available it will run the old compiled version and not give me any error.
I thought this was normal until I met up with my friend and he had been getting error messages the whole time.
Any idea why this is? I'm using windows (tried on windows 10, 8, and 7), he's using some osx distribution (most likely the latest). I've tried all available versions of ImageJ from the website, so I don't think it's a version issue. Is this the norm on windows for some reason?
I suspect you are using ImageJ 1.x, e.g. downloaded from here? And trying to compile via Plugins>Compile and Run...
?
In general, I would recommend developing Java code in Eclipse - as having a proper IDE is vastly more powerful than what you can get in ImageJ.
If all you need to do is write simple Macros calling existing ImageJ functions then writing them in the various non-Java scripting languages within ImageJ is perfectly sufficient.
If you decide Eclipse isn't your thing and you want to continue developing within ImageJ, I would strongly recommend using the Fiji distribution of ImageJ - as it includes a robust script editor.
If you use this editor to write Java code, it will save your scripts to disk as .java
files and then call the Java compiler (javac
) on them, which will give you a more complete picture of any compilation problems.