When trying to run my Project I run into the following Error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no libz3java in java.library.path: [it then prints the path]
In this question and reply the solution was to add the file "libz3java.so" to the java.library.path. However, no such file exists in my folder "z3-4.12.2-x64-win/bin" (which is where the jar I gave to Maven as a dependency for z3 is). The folder does include the files "libz3java.dll", "libz3java.lib", should it be included alongside these? Or should one of these be used instead?
I have attempted to find this file as follows:
SET | findstr '^LD_LIBRARY_PATH'
(As a Windows-equivalent of the command in the previous Stackoverflow-question?). The (translation) of the output is:Cmdlet Set-Variable at the Command-pipeline-position 1
Give values for the following Parameters:
Name[0]:
But this seems to set something instead of print (the path)? I have also tried running the exact command in a Linux-Shell, but then there is no output at all.
I would much appreciate any help on how to run it with z3 linked and/or on locating the required libz3java file(s). Thank you very much in advance.
Two methods depending upon your configuration:
In eclipse: Run As -> Run Configurations -> Arguments Tab -> then inside VM Arguments, put this:
-Djava.library.path=/path/to/libz3.so/and/libz3java.so/files>
When using cmd, run as:
java -Djava.library.path="/path/to/directory/containing/libz3java.so" ...
Note:
For Windows: extension will be ".dll".
For Ubuntu: extension will be ".so".
For Mac: extension will be ".dylib".
Extensions for libz3 and libz3java file.