Add a Java system dependency for facilitating JNI development
See original GitHub issueI am working on Java bindings for a project. Java installations typically come with an include
folder that has various headers for interacting with the JVM or the JNI. The include
directory isn’t symlinked into a default header location by default, no does it typically reside in the same location across systems (Fedora, Ubuntu, Windows, Mac, etc.).
I want to propose a Java system dependency that hooks up any libraries and include directories to your project.
I am interested in creating a PR for this myself.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
JNI tips | Android NDK
Keep your interface code in a low number of easily identified C++ and Java source locations to facilitate future refactors. Consider using a...
Read more >Java Native Interface (JNI) - Java Programming Tutorial
Java supports native codes via the Java Native Interface (JNI). JNI is difficult, as it involves two languages and runtimes.
Read more >Set up JNI development in Gradle project - IntelliJ IDEA
IntelliJ IDEA supports JNI development in Gradle projects. This tutorial uses on the Java 1.8 and Gradle 7.4 versions. The tutorial uses the...
Read more >Java Native Interface (JNI) - IBM
Java Native Interface (JNI) is a native programming interface that is part of the Java Software Development Kit (SDK).
Read more >Building the JDK - OpenJDK
Large portions of the JDK consists of native code, that needs to be compiled to be able to run on the target platform....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Here’s my attempt to add some docs on writing system dependencies: https://github.com/mesonbuild/meson/pull/8228
As a dependency name
jni
is probably better thanjava
. I looked into adding this ages ago but the need for it evaporated. From what I can remember it would have needed to do something like this (on Linux):/usr/include
but somewhere else, maybe underlib
orshare
and, if memory serves, that path is different on Debian vs FedoraAnother thing I remember pondering was that there are two different ways of doing JNI, one required compiling the source with
javah
or something while the newer one worked in some easier way. It would be nice to not have to support the former but I don’t know how widespread its usage is nowadays.