DImuthuUpe/Tesseract-API — pull request #5 by jahewson (2014-10-09 21:17:41+00:00)
Title: Build a single multi-platform jar

I've altered the build so that the native library is built with a filename matching the current os and cpu architecture, e.g. `tessbaseapi-macosx-x86_64.dylib`. This allows the jar file to contain libraries for as many platforms as we wish. I've updated TessBaseAPI.java to load the appropriate library for the current platform.

Because we have lots of different platforms, it's best to add the final built libraries to git, which I've done for Mac OS X 64-bit and Linux 64-bit. Because it's now possible to want to compile the Java code and build the jar without wanting to re-compile the native libraries, I've added a "skipNative" property to Maven so that a Java-only build can be performed with `mvn install -DskipNative`.

I've also removed the mx-native-loader dependency and replaced it with a small NativeUtil which performs the same task, but without the complex mapping of library names (i.e. adding "lib" as a prefix). You might want to use a similar solution for gh-4, i.e. extracting to a temp file, because Tesseract needs to read its data files from the disk, it can't load data from Java resources.