Login  Register

Re: ImageJ Compile&Run compiles java program in editor but runs from cache. How to fix?

Posted by Michael Schmid on Sep 19, 2017; 4:21pm
URL: http://imagej.273.s1.nabble.com/ImageJ-Compile-Run-compiles-java-program-in-editor-but-runs-from-cache-How-to-fix-tp5019392p5019397.html

Hi Fred,

in my experience, 'Compile&Run' recompiles source files that are newer
than the corresponding .class files. This is true for all classes that
are called from the main class (the one you select with 'Compile&Run'),
not recursively for others.

So if you have
  My_Plugin, calling
    SubClass1, calling
      SubClass2
and My_Plugin has no reference to SubClass2,
then ImageJ won't compile SubClass2, even if SubClass2.java is newer
than SubClass2.class.

To make sure, just delete all .class files, then ImageJ will recompile all.


Michael
________________________________________________________________
On 19/09/2017 05:04, Fred wrote:
> I have been successfully Compile&Run(ing) a Java plugin from the ImageJ editor. At one point the plugin seemed to be in an infinite loop (using massive CPU and not responding to gui interactions). I killed the ImageJ process, and then restarted ImageJ.  Now imagej only runs the version of the program, i.e., class files, that existed when I start imagej.
>
> I can make changes and 'Compile and Run...' .  The java program(s) will compile. Although the program, i.e., class files, that is run is the one that existed when imagej started   I suspect that imagej is caching the class files for some reason, but the cache is prevented from being updated.  Where is this cache or how to get imagej to compile and RUN the program from the editor?
>
> Thanks in advance,
>
> Fred

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html