[ImageJ-bugs] [Bug 893] Small compiler issue within the Fiji script editor
bugzilla at fiji.sc
bugzilla at fiji.sc
Tue Aug 26 03:03:42 CDT 2014
http://fiji.sc/bugzilla/show_bug.cgi?id=893
--- Comment #1 from CARL <philippe.carl at unistra.fr> ---
Dear Curtis,
I will try to adress all your comments and hope not to forget some of your
points.
So first I still have the same problem and I get the following error message:
Started Radial_Profile_Angle_Ext.java at Mon Aug 25 14:12:15 CEST 2014
Compiling 1 file in C:\Users\Ph-K\AppData\Local\Temp\java8197273006779848693
C:\Users\Ph-K\AppData\Local\Temp\java8197273006779848693\src\main\java\Radial_Profile_Angle_Ext.java:59:
cannot access MultyPlotExt bad class file:
RegularFileObject[C:\Work\SOFTWA~1\Fiji\plugins\Radial2\multi_plot\MultyPlotExt.class]
class file contains wrong class: multi_plot.MultyPlotExt Please remove or make
sure it appears in the correct subdirectory of the classpath.
MultyPlotExt plot;
^
org.scijava.minimaven.JavaCompiler$CompileError: Compile error: 1
at org.scijava.minimaven.JavaCompiler.call(JavaCompiler.java:80)
at org.scijava.minimaven.MavenProject.build(MavenProject.java:477)
at org.scijava.minimaven.MavenProject.build(MavenProject.java:406)
at org.scijava.minimaven.MavenProject.build(MavenProject.java:391)
at org.scijava.plugins.scripting.java.JavaEngine.eval(JavaEngine.java:154)
at org.scijava.script.ScriptModule.run(ScriptModule.java:175)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65)
at
org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:164)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Then following the advice of Wayne (it was through a private E-mailing) I had
filed in a bug report about this issue one or two days after my first mail.
And by following your description of using the following BeanShell Script in
the Editor:
import multi_plot.*;
print(MultyPlotExt.class.getName());
It works perfectly and I get actually the following output:
Started New_.bsh at Mon Aug 25 14:15:50 CEST 2014 multi_plot.MultyPlotExt
> Another possibility is that you made changes to the multi_plot code and then they were not reflected when executing code from the Script Editor until after ImageJ was restarted?
No, I didn't make any changes within the multi_plot code and started Fiji just
before trying to compile the code.
> If you could isolate a minimal, complete, verifiable example (MCVE), it would be much appreciated!
I replayed from scratch the action I described in my first mail and it is still
not working (and I have an up to date Fiji version).
I may have a hint why there is this problem (just an idea) which is the fact
that the compiled files are generated within the following folder:
"C:\Users\Ph-K\AppData\Local\Temp\java8197273006779848693"
and not within the "Fiji\plugins" folder one.
This change came with an update I made (either of Fiji or Java) and is probably
the issue, since it is maybe looking for a
"C:\Users\Ph-K\AppData\Local\Temp\java8197273006779848693\multi_plot" folder
and not a "Fiji\plugins\Radial\multi_plot" one.
I will look into your suggested IDE developing options.
My best regards,
Philippe
-----Message d'origine-----
De : ImageJ Interest Group [mailto:IMAGEJ at list.nih.gov] De la part de Curtis
Rueden Envoyé : vendredi 22 août 2014 21:18 À : IMAGEJ at list.nih.gov Objet : Re:
Small compiler issue within the Fiji script editor
Hi Philippe,
> Radial_Profile_Angle_Ext.java:18: package multi_plot does not exist
I cannot reproduce the problem you describe. After unpacking the JAR file into
my ImageJ's plugins folder, the following BeanShell works in my Script
Editor:
import multi_plot.*;
print(MultyPlotExt.class.getName());
Possibly, this issue was addressed since you wrote the mail. Or else there is
something different in the steps we followed. If you still have this problem,
please file a bug report using Help > Report a Bug -- it will report exact
details of your ImageJ installation including OS, plugin versions, etc.
Another possibility is that you made changes to the multi_plot code and then
they were not reflected when executing code from the Script Editor until after
ImageJ was restarted? If so, that is an issue I have seen
recently: there are some class loading quirks right now with classes present in
the jars or plugins folder which getting repeatedly recompiled without
restarting ImageJ. If you could isolate a minimal, complete, verifiable example
(MCVE), it would be much appreciated!
> I was still developing code in the same way with success some weeks
> ago
I would encourage you to try developing plugins in an IDE, since there are many
advantages. Once you become proficient with the software it is much faster,
with many powerful debugging tools. See:
https://github.com/imagej/minimal-ij1-plugin
https://www.youtube.com/watch?v=Ac-6gJ2eRb0
http://imagej.net/Debugging#Attaching_to_ImageJ_instances
http://imagej.net/Maven
These resources are far from perfect, but hopefully they help get you started.
Regards,
Curtis
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-bugs/attachments/20140826/c9706e8f/attachment.html>
More information about the Imagej-bugs
mailing list