aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTristan Partin <tristan@partin.io>2022-01-26 00:33:58 -0600
committerEli Schwartz <eschwartz93@gmail.com>2022-03-02 16:23:09 -0500
commit96b2469544fba40e63d009db73b41c3b07b80684 (patch)
tree4d365b8e8c8a6a8784b55b37eefa2b8b33b2d09b /docs
parentf9bfeb2add70973113ab4a98454a5c5d7e3a26ae (diff)
downloadmeson-96b2469544fba40e63d009db73b41c3b07b80684.zip
meson-96b2469544fba40e63d009db73b41c3b07b80684.tar.gz
meson-96b2469544fba40e63d009db73b41c3b07b80684.tar.bz2
Rename JDK system dep to JNI
JNI is a more apt name because it currently only supports the JNI. I also believe that CMake uses the terminology JNI here as well. JNI is currently the only way to interact with the JVM through native code, but there is a project called "Project Panama" which aims to be another way for native code to interact with the JVM.
Diffstat (limited to 'docs')
-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')`.