mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 00:55:31 +00:00
Specify and document value for environment variable for loading native library in Java bindings (#5477)
* limit range of environment variable for loading the native library in Java to "true". This change specifies the range of values that are allowed to set the environment variable "z3.skipLibraryLoad". Only the value "true" (in upper-, lower-, and mixed-case is accepted as valid value. Other values, such as "false", "0", "1", "foo", an empty or a missing value are evaluated to "false" and cause the default loading of the native library. * adding documentation about environment variable for (not) loading the native library in Java. This is a follow-up commit for #4667 to provide a publicly visible documentation.
This commit is contained in:
parent
35698c650d
commit
764e033bf4
2 changed files with 7 additions and 1 deletions
|
@ -545,7 +545,7 @@ def mk_java(java_dir, package_name):
|
|||
java_native.write(' public static native void setInternalErrorHandler(long ctx);\n\n')
|
||||
|
||||
java_native.write(' static {\n')
|
||||
java_native.write(' if (null == System.getProperty("z3.skipLibraryLoad")) {\n')
|
||||
java_native.write(' if (!Boolean.parseBoolean(System.getProperty("z3.skipLibraryLoad"))) {\n')
|
||||
java_native.write(' try {\n')
|
||||
java_native.write(' System.loadLibrary("z3java");\n')
|
||||
java_native.write(' } catch (UnsatisfiedLinkError ex) {\n')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue