mirror of
https://github.com/Z3Prover/z3
synced 2026-01-21 17:44:43 +00:00
* Initial plan * Add comprehensive Java IDE setup documentation Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Fix documentation issues: use version placeholder and fix Gradle syntax Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
28 lines
1.2 KiB
Text
28 lines
1.2 KiB
Text
A small example using the Z3 Java bindings.
|
|
|
|
## IDE Setup
|
|
|
|
For detailed instructions on setting up Z3 Java bindings in Eclipse, IntelliJ IDEA,
|
|
or Visual Studio Code, see:
|
|
../../doc/JAVA_IDE_SETUP.md
|
|
|
|
## Building and Running Examples
|
|
|
|
To build the example, configure Z3 with the --java option to scripts/mk_make.py, build via
|
|
make examples
|
|
in the build directory.
|
|
|
|
It will create JavaExample.class in the build directory,
|
|
which can be run on Windows via
|
|
java -cp com.microsoft.z3.jar;. JavaExample
|
|
|
|
On Linux and FreeBSD, we must use
|
|
LD_LIBRARY_PATH=. java -cp com.microsoft.z3.jar:. JavaExample
|
|
On macOS, the corresponding option is DYLD_LIBRARY_PATH:
|
|
DYLD_LIBRARY_PATH=. java -cp com.microsoft.z3.jar:. JavaExample
|
|
|
|
By default, Z3 Java bindings are automatically loading the required native library for Z3 from the default library path.
|
|
In certain environments, depending on the developing process, the Z3 library is not available in the given library path.
|
|
To disable the automated loading process, the user can set the environment variable "z3.skipLibraryLoad=true".
|
|
In that case, the calling application should directly load the corresponding libraries before any interaction with Z3.
|
|
|