<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi Curtis<br>
    <br>
    I already strongly suggest to use Fiji/ImageJ2, but I would like (if
    reasonably possible) to maintain an imageJ version<br>
    <br>
    I packed this in the jar file<br>
    <br>
    /imglib2-2.0.0-beta-26.jar<br>
    /imglib2-2.0.0-SNAPSHOT.jar<br>
    /imglib2-algorithms-2.0.0-beta-26.jar<br>
    /imglib2-algorithms-gpl-2.0.0-beta-26.jar<br>
    /imglib2-algorithms-legacy-2.0.0-beta-26.jar<br>
    /imglib2-ij-2.0.0-beta-26.jar<br>
    /imglib2-meta-2.0.0-beta-26.jar<br>
    /imglib2-ops-2.0.0-beta-26.jar<br>
    /imglib2-realtransform-2.0.0-beta-26.jar<br>
    /imglib2-ui-2.0.0-SNAPSHOT.jar<br>
    /scifio-0.16.5.jar<br>
    /scifio-bf-compat-1.8.4.jar<br>
    /scifio-cli-0.1.0.jar<br>
    /scifio-jai-imageio-1.1.0.jar<br>
    /scifio-lifesci-0.5.2.jar<br>
    /scifio-ome-xml-0.9.2.jar<br>
    /scifio-tools-0.14.0.jar<br>
    /scijava-common-2.33.0.jar<br>
    /scijava-plugins-commands-0.1.7.jar<br>
    /scijava-plugins-platforms-0.1.2.jar<br>
    /scijava-plugins-text-markdown-0.1.1.jar<br>
    /scijava-plugins-text-plain-0.1.1.jar<br>
    /scijava-ui-awt-0.1.2.jar<br>
    /scijava-ui-swing-0.3.0.jar<br>
    <br>
    <br>
    Apparently it crashes on the instruction<br>
    <br>
            // create the ImgOpener<br>
            ImgOpener imgOpener = new ImgOpener();<br>
    <br>
    ImageJ 1.48v; Java 1.6.0_24 [64-bit]; Linux 3.16.3-200.fc20.x86_64;
    10MB of 455MB (2%)<br>
     <br>
    java.lang.IllegalArgumentException: No compatible service:
    io.scif.SCIFIOService<br>
        at
    org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:242)<br>
        at
    org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:193)<br>
        at
    org.scijava.service.ServiceHelper.loadServices(ServiceHelper.java:169)<br>
        at org.scijava.Context.<init>(Context.java:234)<br>
        at org.scijava.Context.<init>(Context.java:195)<br>
        at org.scijava.Context.<init>(Context.java:138)<br>
        at org.scijava.Context.<init>(Context.java:126)<br>
        at
io.scif.img.AbstractImgIOComponent.<init>(AbstractImgIOComponent.java:57)<br>
        at io.scif.img.ImgOpener.<init>(ImgOpener.java:94)<br>
        at
    mosaic.core.utils.MosaicTest.processResult(MosaicTest.java:178)<br>
        at mosaic.core.utils.MosaicTest.testPlugin(MosaicTest.java:335)<br>
        at mosaic.plugins.test.Jtest.naturalization(Jtest.java:32)<br>
        at mosaic.plugins.Jtest.setup(Jtest.java:39)<br>
        at
ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:47)<br>
        at ij.IJ.runUserPlugIn(IJ.java:201)<br>
        at ij.IJ.runPlugIn(IJ.java:163)<br>
        at ij.Executer.runCommand(Executer.java:131)<br>
        at ij.Executer.run(Executer.java:64)<br>
        at java.lang.Thread.run(Thread.java:662)<br>
    <br>
    <br>
    Cheers<br>
    Pietro<br>
    <br>
    <div class="moz-cite-prefix">On 01/14/2015 05:07 PM, Curtis Rueden
      wrote:<br>
    </div>
    <blockquote
cite="mid:CADN69ymi7G4BUkLftrxQOKLdNO1BcUcLQSnY0x6YNsTgtoRqxw@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Pietro,
        <div><br>
        </div>
        <div>
          <div>> Is there any way to pack a jar with SCIFIO included
            that work also in</div>
          <div>> imageJ1</div>
        </div>
        <div><br>
        </div>
        <div>Certainly. But it would help to be more specific about what
          you are trying to do.</div>
        <div><br>
        </div>
        <div>By "pack a jar with SCIFIO" do you mean "create an uber-JAR
          with dependencies embedded"? Or something else?</div>
        <div><br>
        </div>
        <div>By "ImageJ1" do you mean the vanilla ImageJ1 distribution
          from <a moz-do-not-send="true" href="http://imagej.nih.gov">imagej.nih.gov</a>?
          If so, you can do it, but I would recommend saving yourself a
          lot of work and just recommending people use ImageJ2, which
          comes with SCIFIO already bundled. But if you really want to
          go that route, look at the maven-shade-plugin or
          maven-assembly-plugin [1].</div>
        <div><br>
        </div>
        <div>Regards,</div>
        <div>Curtis</div>
        <div><br>
        </div>
        <div>[1] Here is a starting point for how we create an ImageJ2
          uber-JAR with dependencies: <a moz-do-not-send="true"
href="https://github.com/imagej/imagej/blob/imagej-2.0.0-rc-22/pom.xml#L421-L648">https://github.com/imagej/imagej/blob/imagej-2.0.0-rc-22/pom.xml#L421-L648</a>.
          Your use case would likely be simpler.</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Jan 14, 2015 at 7:18 AM, Pietro
          Incardona <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:incardon@mpi-cbg.de" target="_blank">incardon@mpi-cbg.de</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All<br>
            <br>
            Is there any way to pack a jar with SCIFIO included that
            work also in imageJ1<br>
            <br>
            Cheers<br>
            Pietro<br>
            <br>
            <br>
            _______________________________________________<br>
            ImageJ-devel mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:ImageJ-devel@imagej.net" target="_blank">ImageJ-devel@imagej.net</a><br>
            <a moz-do-not-send="true"
              href="http://imagej.net/mailman/listinfo/imagej-devel"
              target="_blank">http://imagej.net/mailman/listinfo/imagej-devel</a><br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>