public static String libName ( ) throws UnsupportedOperationException { String os = System . getProperty ( "os.name" ) . toLowerCase ( ) ; if ( os . startsWith ( "windows" ) ) { return libNameBare ( ) + ".dll" ; } else if ( os . startsWith ( "mac os x" ) ) { // return libNameBare()+".dylib"; return libNameBare ( ) + ".jnilib" ; } else { return "lib" + libNameBare ( ) + ".so" ; } }
Calculate the filename of the native hunspell lib . The files have completely different names to allow them to live in the same directory and avoid confusion .