|
From: <da...@ix...> - 2003-09-11 16:26:44
|
In article <106...@we...>,
Fredrik Israelsson <wra...@li...> wrote:
>I don't question writing the wrapper in C. My question is more like why one
>cannot make one wrapper release with binaries needed for all platforms. I mean,
>storage space for the few MB:s needed is not a problem theese days.
I'm of two minds about this myself.
After all, the JRE doesn't come with only one package; you have to download
a different package for each arch. Ok, well, Sun's is like that; I have no
experience with any others, so maybe they do.
But on the other hand, personally I package my app separately with all
wrapper stuff appropriate for supports platforms, and distribute all addons
(JDK, 3rd party libs, etc) as a second package, which is platform specific.
Now, currently we only support Linux and Win32, so there are no conflicts
with wrapper and wrapper.exe and wrapper.dll and libwrapper.so.
But, what if I want to package another unix like platform that also uses
.so? Then it becomes a bit trickier.
Sure, I could have wrapper.Linux and wrapper.FreeBSD and modify wrapper.sh
to call wrapper.`uname -s` or something. But that doesn't solve the
dynamically loaded library issue.
I think a nice enhancement would be if the call to System.loadLibrary()
first tried "wrapper" and if that didn't work, try "wrapper.arch" or
something. I'm no Java expert, but it looks like the java property os.name
might be appropriate? Actually, may be a good idea to use os.name +
os.arch to correctly support same OS on multiple platforms. Linux and
FreeBSD, for example, both work on non-i386 arch. And if you're supporting
FreeBSD, which has to build their own java from Sun's source anyway, might
as well support them compiling it on a myriad of platforms.
One reason this really concerns me is that the developers here like to run
the same compiled code on two machines to test communications. Sometimes
those two machines are different OSes. We're lucky now that Linux and
Win32 can coexist. But if we start supporting other platforms, it becomes
more of an issue.
Anyway, just my thoughts on the matter.
Cheers,
mrc
--
Mike Castle da...@ix... www.netcom.com/~dalgoda/
We are all of us living in the shadow of Manhattan. -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc
|