aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Dependencies.md26
-rw-r--r--docs/markdown/Release-notes-for-0.58.0.md4
-rw-r--r--docs/markdown/snippets/jdk-renamed-to-jni.md6
3 files changed, 28 insertions, 8 deletions
diff --git a/docs/markdown/Dependencies.md b/docs/markdown/Dependencies.md
index 3b6b212..a7e34e5 100644
--- a/docs/markdown/Dependencies.md
+++ b/docs/markdown/Dependencies.md
@@ -486,17 +486,31 @@ instead.
## JDK
*(added 0.58.0)*
+*(deprecated 0.62.0)*
-Provides access to compiling with the Java Native Interface (JNI). Lookup is
-entirely dependent on the `target_machine` Java compiler. In a
-cross-compilation, remember to override the Java compiler in order to add the
-correct flags. The `version` keyword is compared against the version of the
-Java compiler. No other `dependency()` keywords are respected.
+Deprecated name for JNI. `dependency('jdk')` instead of `dependency('jni')`.
+
+## JNI
+
+*(added 0.62.0)*
+
+Provides access to compiling with the Java Native Interface (JNI). The lookup
+will first check if `JAVA_HOME` is set in the environment, and if not will use
+the resolved path of `javac`. Systems will usually link your preferred JDK to
+well known paths like `/usr/bin/javac` on Linux for instance. Using the path
+from `JAVA_HOME` or the resolved `javac`, this dependency will place the JDK
+installation's `include` directory and its platform-dependent subdirectory on
+the compiler's include path.
```meson
-dep = dependency('jdk', version: '>= 1.8.0')
+dep = dependency('jni', version: '>= 1.8.0')
```
+**Note**: Due to usage of a resolved path, upgrading the JDK may cause the
+various headers to not be found. In that case, please reconfigure the build
+directory. One workaround is to explicitly set `JAVA_HOME` instead of relying on
+the fallback `javac` resolved path behavior.
+
## libgcrypt
*(added 0.49.0)*
diff --git a/docs/markdown/Release-notes-for-0.58.0.md b/docs/markdown/Release-notes-for-0.58.0.md
index 25674af..e9b8ec2 100644
--- a/docs/markdown/Release-notes-for-0.58.0.md
+++ b/docs/markdown/Release-notes-for-0.58.0.md
@@ -279,7 +279,7 @@ It is now allowed to pass libraries generated by a `custom_target()` to
pkg-config file generator. The output filename must have a known library extension
such as `.a`, `.so`, etc.
-## JDK System Dependency
+## JNI System Dependency
When building projects such as those interacting with the JNI, you need access
to a few header files located in a Java installation. This system dependency
@@ -289,7 +289,7 @@ your system is a located in the `bin` directory of a Java installation. Note:
symlinks are resolved.
```meson
-jdk = dependency('jdk', version : '>=1.8')
+jni_dep = dependency('jni', version : '>=1.8')
```
Currently this system dependency only works on `linux`, `win32`, and `darwin`.
diff --git a/docs/markdown/snippets/jdk-renamed-to-jni.md b/docs/markdown/snippets/jdk-renamed-to-jni.md
new file mode 100644
index 0000000..d1e7f9d
--- /dev/null
+++ b/docs/markdown/snippets/jdk-renamed-to-jni.md
@@ -0,0 +1,6 @@
+## JDK System Dependency Renamed from `jdk` to `jni`
+
+The JDK system dependency is useful for creating native Java modules using the
+JNI. Since the purpose is to find the JNI, it has been decided that a better
+name is in fact "jni". Use of `dependency('jdk')` should be replaced with
+`dependency('jni')`.