<div dir="ltr">Hi Douglas,<div><br></div><div>CCing ome-devel, as this may interest others.</div><div><br></div><div><div>> I'm just trying to use the BFS3 Handler and I'm running into a problem</div><div>> with Java Advanced Imaging.</div></div><div><br></div><div>Yeah, unfortunately, JAI is not just a library -- it's a Java platform extension. This means it installs into the lib/ext folder of your JRE. Usually this is done because native libraries are installed, too. (The whole "Java platform extension" thing is so last decade, though... ;-)</div><div><br></div><div>Anyway, the reason it works on OS X out of the box is that Apple Java 6 ships with Java 3D and JAI installed in /Library/Java/Extensions. They are really old versions, but in this case I guess it did the job.</div><div><br></div><div>IIRC, the reason JAI is not available from a Maven repo is due to licensing issues: Java Advanced Imaging is not open source! [1] So redistributing it from a Maven repo has legal problems.</div><div><br></div><div>Actually though, it looks like there _is_ a fork in Maven Central now, slightly stripped down to avoid said legal issues:</div><div>* <a href="https://github.com/jai-imageio/jai-imageio-core">https://github.com/jai-imageio/jai-imageio-core</a></div><div>* <a href="http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.github.jai-imageio%22%20AND%20a%3A%22jai-imageio-core%22">http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.github.jai-imageio%22%20AND%20a%3A%22jai-imageio-core%22</a><br></div><div><br></div><div>So maybe we could update Bio-Formats to use that! The package names are different so it would require some code changes, though.</div><div><br></div><div>Melissa: any ideas on how you'd prefer to address this issue in Bio-Formats proper?</div><div><br></div><div>Regards,</div><div>Curtis</div><div><br></div><div>[1] <a href="https://en.wikipedia.org/wiki/Java_Advanced_Imaging">https://en.wikipedia.org/wiki/Java_Advanced_Imaging</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 16, 2015 at 10:21 AM, Douglas Russell <span dir="ltr"><<a href="mailto:root@dpwrussell.com" target="_blank">root@dpwrussell.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Curtis,<div><br></div><div>I'm just trying to use the BFS3 Handler and I'm running into a problem with Java Advanced Imaging.</div><div><br></div><div><div>11:04:14.008 [main] INFO loci.formats.FormatHandler - Checking for JAI</div><div>Exception in thread "main" loci.formats.MissingLibraryException: Java Advanced Imaging (JAI) is required to read some TIFF files. Please install JAI from <a href="https://jai.dev.java.net/" target="_blank">https://jai.dev.java.net/</a></div><div><span style="white-space:pre-wrap"> </span>at loci.formats.in.TiffJAIReader.initFile(TiffJAIReader.java:111)</div><div><span style="white-space:pre-wrap"> </span>at loci.formats.FormatReader.setId(FormatReader.java:1426)</div><div><span style="white-space:pre-wrap"> </span>at loci.formats.DelegateReader.setId(DelegateReader.java:298)</div><div><span style="white-space:pre-wrap"> </span>at loci.plugins.in.ImportProcess.initializeFile(ImportProcess.java:505)</div><div><span style="white-space:pre-wrap"> </span>at loci.plugins.in.ImportProcess.execute(ImportProcess.java:143)</div><div><span style="white-space:pre-wrap"> </span>at loci.plugins.BF.openImagePlus(BF.java:92)</div><div><span style="white-space:pre-wrap"> </span>at loci.plugins.BF.openImagePlus(BF.java:77)</div><div><span style="white-space:pre-wrap"> </span>at edu.harvard.hms.bfs3.Main.main(Main.java:54)</div><div>Caused by: loci.common.ReflectException: No such class: javax.media.jai.NullOpImage</div><div><span style="white-space:pre-wrap"> </span>at loci.common.ReflectedUniverse.exec(ReflectedUniverse.java:161)</div><div><span style="white-space:pre-wrap"> </span>at loci.formats.in.TiffJAIReader.initFile(TiffJAIReader.java:104)</div><div><span style="white-space:pre-wrap"> </span>... 7 more</div><div>Caused by: java.lang.ClassNotFoundException: javax.media.jai.NullOpImage</div><div><span style="white-space:pre-wrap"> </span>at java.net.URLClassLoader.findClass(URLClassLoader.java:381)</div><div><span style="white-space:pre-wrap"> </span>at java.lang.ClassLoader.loadClass(ClassLoader.java:424)</div><div><span style="white-space:pre-wrap"> </span>at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)</div><div><span style="white-space:pre-wrap"> </span>at java.lang.ClassLoader.loadClass(ClassLoader.java:357)</div><div><span style="white-space:pre-wrap"> </span>at java.lang.Class.forName0(Native Method)</div><div><span style="white-space:pre-wrap"> </span>at java.lang.Class.forName(Class.java:348)</div><div><span style="white-space:pre-wrap"> </span>at loci.common.ReflectedUniverse.exec(ReflectedUniverse.java:153)</div><div><span style="white-space:pre-wrap"> </span>... 8 more</div></div><div><br></div><div>I tried adding a maven dependency for JAI, but it looks like that is not in the imagej maven repository. Obviously it worked on your laptop in Paris so it must have been there somehow. What do you think the best resolution is? My knowledge of Maven is extremely limited as I stopped using Java around the time it was really taking off, but I would have thought that this could be fixed by adding another maven repository to the pom... but it's odd that it worked for you on your laptop without any of that.</div><div><br></div><div>Cheers,</div><div><br></div><div>Douglas</div></div>
</blockquote></div><br></div>