Fast Artificial Neural Network Library

Working with FANN from Java and Scala

I have recently started using FANN from Scala, and in order to do this I had to get fannj to work.

fannj is great and supports most of the features I need, and it works fine from Scala even works with FANN 2.2.

However, I had a few issues getting everything to work and for this I found this article very helpfull: Installing FANN on Java project and NativeLibrary.loadLibrary problems with 32bit/64bit


  1. October 24, 2012    

    Glad its working for you now! The wiki page at FannJ has been improved using the linked information. If you find other areas that need improvement, please let us know. Thanks!

  2. Anastasios Tsiolakidis Anastasios Tsiolakidis
    February 24, 2013    

    I’ve noticed your link chose to “downgrade” his Java to 32bit for this to work. It looks like that .jar file is “32bit” as well, somehow the whole toolchain has to be 32 bit or 64 bit, but it looked to me like JNA could become arch-agnostic with a couple of “unclean” modifications. Anyway, I am trying to compile FANN for 64 bits with Visual Studio 2012, after converting the project in the laste it builds the 32 bit version OK, but switching to 64 bits it has problems finding the includes (maybe more, I am stuck at this first error). That is weird to say the least as a VS behaviour, and certainly I am not impressed with the “absence” of automatic x64 builds in VS2012, I vaguely remember it used to be as easy as selecting “Release X64” instead of the default “Debug”, now this is handled by Configuration and asks a few more questions. Plus, it creates a X64 temp directory during build which could be the reason the include path is borged (all those ..\.. are invalid, perhaps they are not auto-corrected). For the time being I haven’t been able to inspect the Includes in the IDE, which may be caused by imperfect project conversion code. It would be nice to have 64 bit compiles as well by default, after all I did get the x64 Scala as well. Thanks!

Leave a Reply