How to influence search path of System.loadLibrary() through Java code?

前端 未结 6 1096
一向
一向 2021-02-04 03:18

In a Java project, I am using a third-party library that loads some native library via

System.loadLibrary(\"libName\");

I\'d like to be able to

6条回答
  •  情深已故
    2021-02-04 03:56

    Is there a simpler way?

    Yes, provide batch/script files to start the application. Then you can set the correct path in the batch/shell file or even read the value from an environment variable. Much easier then trying to do it from inside the application.

提交回复
热议问题