Old plugin not working on Fiji but working on ImageJ

Hi!

I’m trying to use the LiveWire Plugin in Fiji. I know it’s an old one (last version back from 2009), but I couldn’t find any alternatives (suggestions are welcome ;)).

The plugin works using this ImageJ but I cannot make it work on Fiji.

This is what I have tried so far.

  1. Copy the .jar directly to plugins folder. In this case I get the error Unrecognized command: “LiveWire1DTool” in line 5"
  2. Create the folder Tools in plugins and extract all contents of .jar there as suggested in the wiki of the plugin. In this case I get the following errors:
LiveWire1DTool_ not up-to-date because 1 source files are not up-to-date (/tmp/java768769136552821911/src/main/java/LiveWire1DTool_.java)
Compiling 1 file in /tmp/java768769136552821911
(...)
No javax.tools.JavaCompiler available. Checking for explicit javac.
No javac.jar found (looked in /home/iyan/Desktop/Fiji/Fiji.app/jars)!
java.lang.ClassNotFoundException: com.sun.tools.javac.Main
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at org.scijava.minimaven.JavaCompiler.call(JavaCompiler.java:94)
	at org.scijava.minimaven.MavenProject.build(MavenProject.java:538)
	at org.scijava.minimaven.MavenProject.build(MavenProject.java:463)
	at org.scijava.minimaven.MavenProject.build(MavenProject.java:446)
	at org.scijava.plugins.scripting.java.JavaEngine.compile(JavaEngine.java:209)
	at org.scijava.plugins.scripting.java.JavaEngine.eval(JavaEngine.java:136)
	at org.scijava.script.ScriptModule.run(ScriptModule.java:157)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:124)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63)
	at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Could not find javac java.lang.ClassNotFoundException: com.sun.tools.javac.Main, falling back to system javac
(...)
'/tmp/java768769136552821911/src/main/java/LiveWire1DTool_.java'
warning: Supported source version 'RELEASE_8' from annotation processor 'org.scijava.annotations.AnnotationProcessor' less than -source '15'
/tmp/java768769136552821911/src/main/java/LiveWire1DTool_.java:4: error: cannot find symbol
public class LiveWire1DTool_ extends LiveWireTool implements PlugIn {
                                     ^
  symbol: class LiveWireTool
1 error
1 warning
[ERROR] java.lang.RuntimeException: Could not even fall back  to javac in the PATH
	at org.scijava.minimaven.JavaCompiler.call(JavaCompiler.java:129)
	at org.scijava.minimaven.MavenProject.build(MavenProject.java:538)
	at org.scijava.minimaven.MavenProject.build(MavenProject.java:463)
	at org.scijava.minimaven.MavenProject.build(MavenProject.java:446)
	at org.scijava.plugins.scripting.java.JavaEngine.compile(JavaEngine.java:209)
	at org.scijava.plugins.scripting.java.JavaEngine.eval(JavaEngine.java:136)
	at org.scijava.script.ScriptModule.run(ScriptModule.java:157)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:124)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63)
	at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: exit status 1: [javac, -classpath, (...)

org.scijava.console.MultiPrintStream@629de7b1
	at org.scijava.util.ProcessUtils.exec(ProcessUtils.java:130)
	at org.scijava.util.ProcessUtils.exec(ProcessUtils.java:69)
	at org.scijava.minimaven.JavaCompiler.execute(JavaCompiler.java:169)
	at org.scijava.minimaven.JavaCompiler.call(JavaCompiler.java:126)
	... 14 more

This is probably because tools and javac libraries were removed from the core ImageJ and Fiji update sites as explained by @ctrueden here.

  1. I removed the java folder so Fiji used the Java SDK from the system (java-15-openjdk)
LiveWire1DTool_ not up-to-date because 1 source files are not up-to-date (/tmp/java7988439297729143799/src/main/java/LiveWire1DTool_.java)
Compiling 1 file in /tmp/java7988439297729143799
(...)
/tmp/java7988439297729143799/src/main/java/LiveWire1DTool_.java:4: error: cannot find symbol
public class LiveWire1DTool_ extends LiveWireTool implements PlugIn {
                                     ^
  symbol: class LiveWireTool
1 error
[ERROR] java.lang.ClassNotFoundException: LiveWire1DTool_
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	at org.scijava.plugins.scripting.java.JavaEngine.compile(JavaEngine.java:228)
	at org.scijava.plugins.scripting.java.JavaEngine.eval(JavaEngine.java:136)
	at org.scijava.script.ScriptModule.run(ScriptModule.java:157)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:124)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63)
	at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
  1. I tried with java-8-openjdk and same result.

Any ideas?

Thanks!

Okay, I should have read the whole old post before posting this one. The accepted solution (also from @ctrueden) also applies here.

I removed the .java files leaving only the .class, and it seems to work as in ImageJ.

3 Likes