How do you package multiple sets of native class files into a single jar?
<p>I have some external C code which has been built for multiple platforms(Windows, Linux, Mac), and want to package them all in a single .jar so that this .jar can be used as a library regardless of the platform.</p>

<p>This would allow me to pass a Java project around from computer to computer with the same single external library. </p>

<p>There are existing class files which are calling the code using JNI, and those classes are the ones which differ on different platforms. In the current state, we swap out jars with different classes which call native functions for that particular platform.</p>

<p>Is there a way to package them in such a way that I can dynamically load the correct class file without having to use Ant/Maven or create an abstraction layer?</p>
