SymbolicPathFinder / jpf-symbc

Symbolic PathFinder
https://github.com/SymbolicPathFinder/jpf-symbc
130 stars 91 forks source link

no libz3java in java.library.path #51

Closed Xintao-C closed 2 years ago

Xintao-C commented 4 years ago

Hi, when I run the example TestArray.jpf, I got a error "java.lang.UnsatisfiedLinkError: no libz3java in java.library.path". I try to add libz3java.so to java.library.path,but I still got the same error. Can you tell me why? thank you. 图片

corinus commented 4 years ago

You should add it to the dynamic library path

Sent from my iPhone

On Jun 7, 2020, at 5:10 AM, Xintao-C notifications@github.com wrote:

 Hi, when I run the example TestArray.jpf, I got a error "java.lang.UnsatisfiedLinkError: no libz3java in java.library.path". I try to add libz3java.so to java.library.path,but I still got the same error. Can you tell me why? thank you.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Xintao-C commented 4 years ago

You should add it to the dynamic library path Sent from my iPhone On Jun 7, 2020, at 5:10 AM, Xintao-C @.***> wrote:  Hi, when I run the example TestArray.jpf, I got a error "java.lang.UnsatisfiedLinkError: no libz3java in java.library.path". I try to add libz3java.so to java.library.path,but I still got the same error. Can you tell me why? thank you. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Thank you for your reply. But My computer running environment is Windows 7, JDK 1.8, How can I set the dynamic library path to point to z3?

best wishes

cuixiaoyiyi commented 4 years ago

@Xintao-C I am puzzled that there is no z3 dynamic library in Windows environment in jpf-symbc. That is, there is no z3.dll in the lib folder. (Maybe there is something I don’t know)

You can look for the release version z3-4.8.8 required by Windows in the z3 project, and then copy it in the lib directory or your Java environment variable PATH.

That worked for me.

Xintao-C commented 4 years ago

@cuixiaoyiyi Thank you. I will try to work as you, I hope it works.

franck-van-breugel commented 2 years ago

For examples that use Z3, dynamic libraries/shared libraries for Z3 need to be linked. These libraries can be found in the lib directory of jpf-symbc. In a Windows 10 PowerShell this can be done by issuing the following command.

$Env:PATH = "/path/to/lib/directory/of/jpf-symbc/;" + $Env:PATH