简体   繁体   中英

Java with JACOB - How to properly set Java Library Path

I'm challenging with a problem with library path and jacob. Ok, so let's go to the beginning.

I'm writting an application which needs to use jacob library etc - this applications has to be run as JAR file and here is the whole goal. I'm loading the library using System.load() method - works fine. Inside the code I have declared a method which extracts the jacob.dll file to the external folder, afterwards this path needs to me add to the java library path, what is done by:

System.setProperty("java.library.path", path);

But when I run my JAR I'm getting an unsatisfied link error. So my question is, how to add the path where the dll file is extracted?

PS When I add the path in project properties - Native library everything works fine but the problem is that it's impossible to set java temp in native library.

Do anyone have idea what can I do with this sort of problem?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM