|
Bugzilla – Bug 1074 |
I could not compile the Versatile Wand plugin |
Last modified: 2015-09-19 22:33:53 CDT |
| ⚠ |
NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug. The Fiji project now uses GitHub Issues for issue tracking. Please file all new issues there. |
| I could not compile the Versatile Wand plugin | |
|
|
|
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
Using Java 1.6.0_65 on OS X 10.10.2, I can compile and run Versatile_Wand.java by clicking on "Run" in the Script Editor. I can then install the Versatile Wand as a tool by checking "Install Tool" in the dialog and clicking "OK", but I get this error message Could not load class Versatile_Wand in line 6 call("Versatile_Wand.setOptions"); when I attempt to open the Versatile Wand Options dialog by double clicking on the tool icon. When I run the "Versatile Wand" command from the Plugins menu I get this error message in the "Console" window: Compiling 1 file in /var/folders/sj/hs9p4kxn1z9brlkf83ycm4qr0000gn/T/java898253394430329430 Note: /var/folders/sj/hs9p4kxn1z9brlkf83ycm4qr0000gn/T/java898253394430329430/src/main/java/Versatile_Wand.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Using Java jdk1.8.0_45.jdk on OS X 10.10.3, I get this error message when I open Versatile_Wand.java in the Script Editor and click "Run": Started Versatile_Wand.java at Fri May 22 11:21:30 EDT 2015 Compiling 1 file in /var/folders/sj/hs9p4kxn1z9brlkf83ycm4qr0000gn/T/java4428824321535213749 /var/folders/sj/hs9p4kxn1z9brlkf83ycm4qr0000gn/T/java4428824321535213749/src/main/java/Versatile_Wand.java:16: cannot access java.util.Hashtable bad class file: ZipFileIndexFileObject[/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/lib/ct.sym(META-INF/sym/rt.jar/java/util/Hashtable.class)] class file has wrong version 52.0, should be 50.0 Please remove or make sure it appears in the correct subdirectory of the classpath. import java.util.Hashtable; ^ 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.compile(JavaEngine.java:211) at org.scijava.plugins.scripting.java.JavaEngine.eval(JavaEngine.java:135) at org.scijava.plugins.scripting.java.JavaEngine.eval(JavaEngine.java:173) 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:181) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) java.lang.NullPointerException at java.lang.Class.isAssignableFrom(Native Method) at org.scijava.plugins.scripting.java.CommandJavaRunner.supports(CommandJavaRunner.java:71) at org.scijava.plugins.scripting.java.CommandJavaRunner.supports(CommandJavaRunner.java:46) at org.scijava.plugins.scripting.java.DefaultJavaService.run(DefaultJavaService.java:60) at org.scijava.plugins.scripting.java.JavaEngine.eval(JavaEngine.java:136) at org.scijava.plugins.scripting.java.JavaEngine.eval(JavaEngine.java:173) 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:181) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)Compiling in the Script Editor is also broken with Java 6. To reproduce: 1. Open the Script Editor. 2. Open Templates>Java>Plot Example. 3. Click "Run" and save on the Desktop (you are not allowed to save in Fiji.app/plugins). 4. The plugin runs and displays a window named "Example plot". 5. Attempts to re-run, without re-compiling, fail because there is no "Plot Example" command in the Plugins menu or in the "Command Finder" dialog. 6. The macro command run("Plot Example") also fails, evan after restarting Fiji.