I was upgrading a Java application which must call some native code at some point.
Our application is targeted to run on Windows platform and MacOSX. The company I’m working with has bought Excelsior xFunction. This library aims to ease calling native libraries from java application, and it succeed pretty well. It comes as a standard Java jar archive and a native library for each platform ( xFunction.dll, or dylib or .so depending of the target operating system to run the application on).
The developers on the project knows already how to use the library, they’re even pretty familiar with it.
Besides this, on this specific project, we only have to call a pair of native functions which returns pretty classic arguments. Nothing hard to do.
A perfect and easy job for xFunction. Or so I thought…
We wrote our code, built the various distribution thanks to our maven 2 build with the use of profiles and then… we discovered the xFunction library on macOSX is only available compiled for powerPC platform. Running it on a intel based Macintosh seems not possible, the JVM running the java code is x86 code. Macintosh comes with some kind of emulator called Rosetta which seamlessly execute ppc code on a x86 machine, but it seems you can’t load a powerpc library from x86 code.
I’m far from being an expert, but it sounds easy to me, to make the xFunction library available on intel platform maybe just to … recompile it, and that’s all. So we send an email to the company making xFunction… and here’s what they reply to us :
…/…
Unfortunately, we have not version of xFunction for Mac OS X that runs on Mac-Intel box.
However, it is possible to hasten the development on the basis of custom projects, with some sharing of costs. If you’re interested, please contact our Sales Dept. at mailto:sales@excelsior-usa.com
Regards,
…/…
Here I did have but two choice, either argue by email with their sales dept :p or … drop XFunction out of the project and replace it by our own code.
Well, we dropped xFunction out because at least we won’t get stuck in the future being force to call a sales dept… :p
This is interesting also, from the open source point of view. I mean, If I did have the source of xFunction, it was a matter of a couple of hours to rebuild and perform some tests on it.