Preparing JNA for use in Eclipse

后端 未结 2 629
被撕碎了的回忆
被撕碎了的回忆 2021-01-24 21:02

Background: I\'m doing machine learning research, and want to use the FANN library to construct neural networks. The source code is written in C, but I need it

相关标签:
2条回答
  • 2021-01-24 21:48

    Two allow Eclipse to use JNA, all you need to do is to put two jar files in Eclipse's Java Build Path, jna.jar and platform.jar. That's it.

    To do this for an individual project, right click on the project in the Package Explorer, click Properties (at the bottom), click Java Build Path on the left, then the Add External Jar files. Browse to the directory with your JNA files and add those two files.

    0 讨论(0)
  • 2021-01-24 21:51

    You don't set in an IDE, just insert in some piece of code that is called BEFORE JNA is called, something like this:

      System.setProperty("jna.library.path", "path you need"); 
    

    Where System is java.lang.System. As for what path you need it must be the path that contains compiled dynamically linked FAAN library (a *dll).

    Or just forget that alltogether and dump FAAN (*dlls, *so..) into Windows/system32 (or other appropriate folder on system you use) and these dll's will be on default search path.

    0 讨论(0)
提交回复
热议问题