Windows How To - krenfro/fannj GitHub Wiki
FANN has pre-built Windows DLLs for FANN version 2.2.0.
#Instructions ##Step 1 : Install FANN Library FANN 2.2.0 contains windows dlls and exe files. Get this installed per the FANN instructions and make sure the .exe files work before you start trying things from Java.
I put fannfloat.dll into the Windows System32 directory.
Alternatively, you can set a windows system property
System.setProperty("jna.library.path", [c:\path\to\fannfloat.dll]);
##Step 2 : Install FANN GUI Tools I have had good luck with FannTool
Download and install using their instructions.
##Step 3 : Create Train and Test your ANN Use the FannTool to create, train, and test your ANN. The training and test file formats are defined in the FANN documentation. Save the ANN when you are happy with it.
##Step 4 : Configure Java Project Using the latest version of the FannJ jar in your Java project, open the ANN file saved using FannTool and run it.
###Solutions To Problems ####No Java Native "Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jna/Platform"
Solution: Download the JNA and add the jar to your project.
####Can' find the FANN library Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'fannfloat': The specified module could not be found.
Solution: Add the following code after you set the JNA library path, run it:
System.out.println( System.getProperty("jna.library.path") ); //maybe the path is malformed
File file = new File(System.getProperty("jna.library.path") + "fannfloat.dll");
System.out.println("Is the dll file there:" + file.exists());
System.load(file.getAbsolutePath());
You can fix the problems if something is wrong with the first two messages easily.
####UnsatisfiedLinkError Exception in thread "main" java.lang.UnsatisfiedLinkError: (ddl path): Can't load IA 32-bit .dll on a AMD 64-bit platform. Yu are probably running a 64bit Java SDK while fannfloat.dll is 32bit.
Solution: Install additional 32bit Java SDK and choose it in the build path for the project.
Thanks to: http://michalturek.blogspot.hk/2012/04/installing-fann-on-java-project-and.html