Posted by
Fred Damen on
Sep 19, 2017; 5:33pm
URL: http://imagej.273.s1.nabble.com/ImageJ-Compile-Run-compiles-java-program-in-editor-but-runs-from-cache-How-to-fix-tp5019392p5019398.html
Greetings Gabriel,
There is only one copy of ImageJ. The problem did not exist before I killed
imagej while it was stuck. The problem existed after and no other changes have
been made, except to the source code of the plugin in question.
The plugin recompiles, timestamps of the class files and java files are when I
hit Ctrl-R. As tests, I inserted a syntax error into the source, hit Ctrl-R,
and the error window pops up correctly identifying the syntax error; I erased
the .class files while imagej is running and ran the plugin from the Plugins
menu and the version that existed when imagej started was run; *without the
.class files in the plugins directory*. This leads me to believe that there
is a cache somewhere; which I can not find.
When I start imagej with the .class files in the plugins directory the .class
files seem to get placed in some cache somewhere, once they are there they do
not get updated. Running the Help->Refresh Menus with the .class files cached
the version that runs is not updated. As a new test I tried, exiting imagej,
erase .class files, start imagej; the plugin does not show up in the Plugins
menu; then I update the plugin, i.e., change a string in a IJ.log, Ctrl-R,
Help->Refresh Menus; the plugin now shows up in the Plugins menu and it runs
the current version. Make another update, Ctrl-R, and it runs the previous
version.
Fred
On Tue, September 19, 2017 11:42 am, Gabriel Landini wrote:
> On Tuesday, 19 September 2017 16:56:01 BST
[hidden email] wrote:
>> The whole point is that I should not have to restart imagej every time I
>> need to recompile a Java plugin. And up to the point that I needed to kill
>> imagej I did not need to restart. Help->Refresh Menus does not cause the
>> newer version of the plugin to be used.
>
> So you mean that the program was modified AND compiled, but the code that runs
> is the old one?
> I would check the date of the class file. Maybe the last time it did no
> compile? Or maybe there is more than one installation of IJ (I have seen that
> several times, people copying plugins in the plugin folder but which never
> appear in the menu... and then realise that there were 2 copies of IJ!
>
> Cheers
>
> Gabriel
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html