Improve Java example README.

This commit is contained in:
levlam 2021-12-19 18:10:59 +03:00
parent e8c0b8780f
commit 4eaae33068

View File

@ -3,6 +3,10 @@
To run this example, you will need installed JDK >= 1.6.
For Javadoc documentation generation PHP is needed.
You can find complete build instructions for your operating system at https://tdlib.github.io/td/build.html?language=Java.
In general, the build process looks as follows.
TDLib should be prebuilt with JNI bindings and installed to local subdirectory `td/` as follows:
```
cd <path to TDLib sources>
@ -13,7 +17,7 @@ cmake --build . --target install
```
If you want to compile TDLib for 32-bit/64-bit Java on Windows using MSVC, you will also need to add `-A Win32`/`-A x64` option to CMake.
In Windows, use Vcpkg toolchain file by adding parameter -DCMAKE_TOOLCHAIN_FILE=<VCPKG_DIR>/scripts/buildsystems/vcpkg.cmake
In Windows, use vcpkg toolchain file by adding parameter -DCMAKE_TOOLCHAIN_FILE=<VCPKG_DIR>/scripts/buildsystems/vcpkg.cmake
Then you can build this example:
```
@ -36,4 +40,4 @@ If you receive "Could NOT find JNI ..." error from CMake, you need to specify to
If you receive java.lang.UnsatisfiedLinkError with "Can't find dependent libraries", you may also need to copy some dependent shared OpenSSL and zlib libraries to `bin/`.
In case you compiled the example as 32-bit version, you may need to give -d32 parameter to Java.
Make sure that you compiled the example for the same architecture as your JVM.