[zeromq-dev] jzmq: embedding native library in JAR
gonzalo diethelm
gdiethelm at dcv.cl
Mon May 30 20:39:38 CEST 2011
> @Gonzalo, perhaps it would be a good idea to allow embedded JNI
> binaries as an optional action rather than a mandatory step for the
> Maven build. Then we can keep the current behavior of using
> java.library.path but allow using an embedded binary if the extra step
> has been taken to add one to the JAR. I can reduce the scope of my
> pull request to only touch the static initializer in ZMQ.java as well
> as App.java to list the arch/os of the current platform should one
> want to know where to embed a library.
If I understood correctly, the new plan would be:
1. By default, not including any native libraries in the JAR.
2. Allow for having multiple native libraries in the JAR, maybe structured by platform, compiler, version: win32/vcc/2.1/0mq.dll, win32/mingw/3.0/0mq.dll, linux/gcc/3.0/0mq.so, etc.
3. Allow for including one or more native libraries in the JAR, if the user specifies it at build time.
If this is the plan, I would agree this is a better idea. I have the feeling the majority of Java libraries do not include a native library in their JARs, even if one is needed, so this should be the default option at build time, but that should not preclude those who want to do it from doing it.
Best regards.
--
Gonzalo Diethelm
More information about the zeromq-dev
mailing list