[ImageJ-devel] [PATCH] Do not import com.apple.mrj.* in MacAdapter

Curtis Rueden ctrueden at wisc.edu
Mon Oct 31 14:03:47 CDT 2011


Hi Wayne,

I wanted to follow up on a patch that Dscho sent a while back, regarding
the line "import com.apple.mrj.*;" in the MacAdapter.source file. Would it
be possible to remove this line of code? It causes a compilation error on
non-Mac platforms.

The reason that "import com.apple.eawt.*;" is OK is because we depend on
AppleJavaExtensions.jar (see
http://developer.apple.com/library/mac/#samplecode/AppleJavaExtensions/Introduction/Intro.html),
which is Apple's official way of compiling Apple-specific code on non-Mac
platforms. But unfortunately the AppleJavaExtensions does not include stubs
for the old com.apple.mrj.* classes.

Thanks,
Curtis


On Fri, Oct 14, 2011 at 12:43 PM, Johannes Schindelin <
Johannes.Schindelin at gmx.de> wrote:

> It is not needed, and the AppleJavaExtensions.jar does not provide
> that package anyway. So this is needed to build ImageJ1 with Maven
> on non-MacOSX.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin at gmx.de>
> ---
>
>        Hi Wayne,
>
>        For debugging purposes, we try to integrate the build process of
>        ij.jar into our ImageJ2 workflow. A side effect is that Fiji will
>        run with a standard ij.jar very soon now.
>
>        But when I try to build ImageJ1's sources with Maven, it complains
>        about the package com.apple.mrj not being found in
>        AppleJavaExtensions.jar (which is provided by Apple to compile
>        stuff for MacOSX on other platforms, such as my Linux setup).
>
>        Wayne, may I ask you to apply this patch? It should not change
>        things on your side, but it will fix build errors here.
>
>        Thanks!
>        Johannes
>
>  plugins/MacAdapter.source |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/plugins/MacAdapter.source b/plugins/MacAdapter.source
> index 8cfabed..9cbff58 100644
> --- a/plugins/MacAdapter.source
> +++ b/plugins/MacAdapter.source
> @@ -1,7 +1,6 @@
>  import ij.plugin.*;
>  import ij.*;
>  import ij.io.*;
> -import com.apple.mrj.*;
>  import com.apple.eawt.*;
>  import java.util.Vector;
>
> --
> 1.7.7.4535.g6ecb2
>
>
> _______________________________________________
> ImageJ-devel mailing list
> ImageJ-devel at imagejdev.org
> http://imagejdev.org/mailman/listinfo/imagej-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20111031/df1f8a65/attachment.html>


More information about the ImageJ-devel mailing list