How to set the java.library.path from Eclipse

后端 未结 16 2734
陌清茗
陌清茗 2020-11-22 05:36

How can I set the java.library.path for a whole Eclipse Project? I\'m using a Java library that relies on OS specific files and need to find a .dll/

16条回答
  •  爱一瞬间的悲伤
    2020-11-22 06:12

    Don't mess with the library path! Eclipse builds it itself!

    Instead, go into the library settings for your projects and, for each jar/etc that requires a native library, expand it in the Libraries tab. In the tree view there, each library has items for source/javadoc and native library locations.

    Specifically: select Project, right click -> Properties / Java Build Path / Libraries tab, select a .jar, expand it, select Native library location, click Edit, folder chooser dialog will appear)

    Messing with the library path on the command line should be your last ditch effort, because you might break something that is already properly set by eclipse.

    Native library location

提交回复
热议问题