← Back to team overview

sikuli-driver team mailing list archive

[Question #689620]: Change where Sikuli loads opencv_java342.dll from

 

New question #689620 on Sikuli:
https://answers.launchpad.net/sikuli/+question/689620

I'm currently using Sikuli with the sikulixapi-2.0.3.jar in Eclipse as a maven dependency in a Java project without installing the SikuliX IDE.

I'm on a locked down network and by default it loads the opencv_java342.dll files from AppData which is blocked by my company, resulting in the following error:
"RunTime:loadLib: opencv_java342.dll (failed) probably dependent libs missing:
C:\Users\userName\AppData\Roaming\Sikulix\SikulixLibs\opencv_java342.dll: Access is denied"

I've been able to get around this by forcing it to update my Environment as a runtime configuration with PATH pointing to a lib folder containing the same DLL's it's trying to load and marking it in Eclipse to replace native environment(Appending didn't resolve the error). I've tried adding this folder in native libraries in my build path and other locations, but they all result in the same error.

This works, but not as intended. Two new folders are created in my workspace, %SystemDrive% and SikulixAppDataNotAvailable, the latter of which contains SikulixLibs and the required DLL files I was trying to point to and this allows my scripts to run locally without being blocked by my company.

What I'm trying to do now is create a runnable Fat JAR file that I can use to run the scripts on a separate system with the working scripts I have now. When I generate that file, the scripts start and perform a couple of actions but return to using the default AppData path for opencv_java342.dll which of course is blocked and fails to continue.

Is there a better way to change how Sikuli loads those DLL files in such a way that I can specify the desired location and get it to load both at runtime and when building the Far JAR file? As currently it seems it has two locations by default, one in AppData, and one alternative it creates in the current workspace if it cannot load the first and when building the Fat JAR file it does not use or take into account the second path, instead trying the first path.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.