http://imagej.273.s1.nabble.com/Unable-to-compile-plugins-with-ImageJ-1-5x-and-Java-1-6-on-windows-tp5018444p5018451.html
Yes of course, but as I wrote the problem is that any attempt on passing .jar .class or .zip files as email attachments has failed due to a strict security policy; renaming the extensions does not work. Pasting the source code as plaintext in an email is therefore the preferred approach, with the benefit that the recipient can then see the code and learn how plugins in ImageJ works.
Sent: 05. april 2017 20:47
Java is "write once, run anywhere"—would it work to simply send them the compiled version as a .jar or .class?
> Hello,
>
> I just downloaded a fresh copy of the official stable version of
> ImageJ (version 1.50i) bundled with 64-bit Java 1.6.0_24 from
>
http://wsr.imagej.net/distros/win/ij150-win-jre6.zip>
> Then I tried to compile a small plugin I wrote myself. I got a message
> that I needed to download Compiler.jar, so I said yes.
>
> Then I get this error message, and the attempt to compile the plugin halts:
>
> ImageJ 1.50i; Java 1.6.0_24 [64-bit]; Windows 7 6.1;
> 16MB of 9121MB (<1%)
>
> java.lang.UnsupportedClassVersionError:
> com/sun/tools/javac/Main : Unsupported major.minor version 52.0
>
> This plugin requires Java 1.8 or later.
>
> Obviously, the latest version of Compiler.jar is not compatible with
> Java 1.6.
>
> I looked in the plugins directory on the website and tried to download
> Compiler.jar from
>
>
https://imagej.nih.gov/ij/plugins/compiler/>
> but the problem is the same. The above link seems to point to the same
> non-working version ImageJ itself downloaded.
>
> Then I tried to copy Compiler.jar from my previous installation of
> ImageJ 1.5x to the plugin/jars folder and then everything worked as it
> should. The working Compiler.jar (compatible with java 1.6) has a file
> date 2015-06-26 (probably meaning that I installed it on that day) and
> a filesize 1063375 bytes. My previous installation was updated
> continuously since v1.49, so several files were inherited from the older versions.
>
> So, what is the proper way to deal with this issue?
> Upgrading to the latest version of 1.51x does not help.
> I do not want to use Java 1.8 because the 3D Viewer does not work with
> that.
>
> The workaroud for me (transfering an old version of the jar file)
> worked well, but the problem is that I need to distribute the plugin
> code for someone else to compile, and cannot send them the compatible
> Compiler.jar as an email attachement since our company security policy
> blocks any attempt on emailing .jar files.
>
> Perhaps a version of Compiler.jar compatible with Java 1.6 should have
> been included in the ij150-win-jre6.zip file?
> It seems that a Java 1.6 compatible version of Compiler.jar was
> included in ij149-jre6-64.zip.
>
> Stein
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>