If I were you, I would make sure that the distribution package had only the corresponding native dll and leave another.
If you want to distribute both, you need to write Java code to load the correct library. System.loadLibrary used to load its own library, and the usual thing to do is call this in the static initializer in your Java code.
If you don't want to be rude to exceptions, you can use this code:
System.getProperty("sun.arch.data.model")
to download the appropriate library. This function will return 32 or 64, respectively.
source share