Javac not found

Hello,

im using Fiji and OPENSPIM at the moment for DeconvolutionLab2 which worked fine yesterday.
Now im getting an error message “Javac not found” ( see below )
I had this error before and think it got solved by changeing the compiler in the options menue, but thats no longer working.
I tried to copy Javac.exe to the Fiji Java bin folder, couldnt find a Javac.jar anywhere and already installed Java JDK, JRE 8 and 10.
Thought about an Update though i tried the latest stable fiji / OPENSPIM version but yes i know the tutorial site…There is no damn “Manage Update site” button anywhere.

Okay, i dont know what happend but OpenSPIM suddenly stopped working after an Update.
Downloaded OpenSPIM and fiji again copied the DecovnolutionLab2.jar and suddenly its working in both.
Trying to find the error…
The general Problem seems to persist though with another plugin.

FIJI ERROR

IJ_webcam_plugin not up-to-date because 1 source files are not up-to-date (C:\Users\ADMINI~1\AppData\Local\Temp\java5541617033323453445\src\main\java\IJ_webcam_plugin.java)
Compiling 1 file in C:\Users\ADMINI~1\AppData\Local\Temp\java5541617033323453445
[-classpath, C:\Users\ADMINI~1\AppData\Local\Temp\java5541617033323453445\target\classes;D:\Fiji.app\plugins\3D_Blob_Segmentation-3.0.1.jar;D:\Fiji.app\plugins\3D_Objects_Counter-2.0.1.jar;D:\Fiji.app\plugins\3D_Viewer-4.0.2.jar;D:\Fiji.app\plugins\AnalyzeSkeleton_-3.3.0.jar;D:\Fiji.app\plugins\Anisotropic_Diffusion_2D-;D:\Fiji.app\plugins\trakem2_tps-1.1.4.jar;D:\Fiji.app\jars\trove4j-3.0.3.jar;D:\Fiji.app\jars\bio-formats\turbojpeg-5.9.0.jar;D:\Fiji.app\jars\udunits-4.3.18.jar;D:\Fiji.app\jars\ui-behaviour-1.7.3.jar;D:\Fiji.app\jars\utils-0.8.1906.jar;D:\Fiji.app\jars\vecmath-1.6.0-scijava-2.jar;D:\Fiji.app\jars\weave_jy2java-2.1.0.jar;D:\Fiji.app\plugins\a\webcam-capture-0.3.10-RC4.jar;D:\Fiji.app\jars\weka-dev-3.9.2.jar;D:\Fiji.app\jars\xerbla-0.8.jar;D:\Fiji.app\jars\xercesImpl-2.8.1.jar;D:\Fiji.app\jars\xml-apis-ext-1.3.04.jar;D:\Fiji.app\jars\xmlgraphics-commons-2.3.jar;D:\Fiji.app\jars\xmpcore-5.1.2.jar;D:\Fiji.app\jars\xz-1.0.jar;D:\Fiji.app\jars\yecht-1.0.jar;D:\Fiji.app\plugins\z_spacing-1.0.3.jar;D:\Fiji.app\java\win64\jdk1.8.0_172\jre\lib\ext\zipfs.jar
No javax.tools.JavaCompiler available. Checking for explicit javac.
No javac.jar found (looked in D:\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:160)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
	at org.scijava.thread.DefaultThreadService$3.call(DefaultThreadService.java:238)
	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
Executing: 'javac' '-classpath' 'C:\Users\ADMINI~1\AppData\Local\Temp\java5541617033323453445\target\classes;D:\Fiji.app\plugins\3D_Blob_Segmentation-;D:\Fiji.app\jars\xmpcore-5.1.2.jar;D:\Fiji.app\jars\xz-1.0.jar;D:\Fiji.app\jars\yecht-1.0.jar;D:\Fiji.app\plugins\z_spacing-1.0.3.jar;D:\Fiji.app\java\win64\jdk1.8.0_172\jre\lib\ext\zipfs.jar' '-d' 'C:\Users\ADMINI~1\AppData\Local\Temp\java5541617033323453445\target\classes' 'C:\Users\ADMINI~1\AppData\Local\Temp\java5541617033323453445\src\main\java\IJ_webcam_plugin.java'
[ERROR] null
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:160)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
	at org.scijava.thread.DefaultThreadService$3.call(DefaultThreadService.java:238)
	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: java.io.IOException: Cannot run program "javac" (in directory "."): CreateProcess error=2, The system cannot find the file specified
	at org.scijava.util.ProcessUtils.exec(ProcessUtils.java:138)
	at org.scijava.util.ProcessUtils.exec(ProcessUtils.java:72)
	at org.scijava.minimaven.JavaCompiler.execute(JavaCompiler.java:169)
	at org.scijava.minimaven.JavaCompiler.call(JavaCompiler.java:126)
	... 14 more
Caused by: java.io.IOException: Cannot run program "javac" (in directory "."): CreateProcess error=2, The system cannot find the file specified
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at java.lang.Runtime.exec(Runtime.java:620)
	at org.scijava.util.ProcessUtils.exec(ProcessUtils.java:99)
	... 17 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
	at java.lang.ProcessImpl.start(ProcessImpl.java:137)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
	... 19 more

did delete most of the search paths as the message would have been too long.

Okay after i updated the new installed version of OpenSPIM it did not restart at first, 2. try did start, stated i shall enable Java 8, still no Manage update site button, luckily there was an error so it showed up by just clicking update.
Checked the Java 8 Update site and during install : Installer failed : Java.lang.runtimeexeption could not verify checksum for …Update\jars\groovy-2.4.8.jar

This error typically happens because there is a .java file in your plugins folder, which ImageJ tries to compile and run on the fly. (Even if a corresponding compiled .class file is also present, ImageJ tries to recompile the .java file, in case it has changed.)

Did you add any .java files? If so, try removing them.

Is Help > Update… present? If you run it, does a window pop up with the “Manage Update Sites” button?

OpenSPIM was developed during the Java 6 era, and as such probably still works best with Java 6.

One thing you could do is to download the final version of Fiji with Java 6, unpack it, and move the java folder from Fiji.app into OpenSPIM.app. Then OpenSPIM should notice and utilize that version of Java 6 when it launches. All of the libraries that ship with the latest OpenSPIM download from 2015 Apr 27 are Java-6-compatible.

Using OpenSPIM with the latest Java-8 version of Fiji is not something anyone is officially supporting or testing at the moment. OpenSPIM has no funding currently and is in minimal maintenance mode. My advice right now would be to download the 2015-04-27 version and avoid updating it if possible.

3 Likes

Thanks a lot for the great info!

I think it probably was a java file in the plugins folder, but i dont know…all out of a sudden it just worked again.

There comes a popup after he scanned everything, but the popup only comes if there are files which need update or uninstall. But if everything is up to date the window does not apear.

Good to know about the java 6 stuff, ill keep that in mind in the future, also am not going to update it anymore.

Thanks a lot :slight_smile:

1 Like