4 ms·
Anyone have real world examples of what JNI and this proposal could do? I am guessing this is for more sophisticated things than just sending data to Microsoft
by mothsonasloth 5y ago
Anyone have real world examples of what JNI and this proposal could do?
I am guessing this is for more sophisticated things than just sending data to Microsoft Excel application?
- pilif 5y agoThis is about calling into any native operating system APIs, as long as they are callable via C or C++ (which these days means "all" operating system APIs). Think native UI controls, native hardware driver access, native access to OS services, etc. JNI is somewhat harder to use, because you need custom glue on both sides of the border: Some custom classes in Java and some custom code on the C (and C++) side. This proposal would remove the need for the glue on the C side and would allow a pure java solution. Something like this has existed in third-party form for a while as JNA (https://github.com/java-native-access/jna https://github.com/java-native-access/jna), but now it's going to be built into the JRE itself (if the proposal passes through review)
- p2detar 5y agoI wrote a tiny article with a couple of examples 3 years ago. [1] Having worked with JNI in the past, I find the FF concept convenient but still somewhat verbose. In any case, my experience is 3 years old. A lot may have changed since then. 1 - https://dev.to/petarov/java-and-native-code-in-openjdk-13-18em https://dev.to/petarov/java-and-native-code-in-openjdk-13-18...
- merb 5y agonetty uses jni https://github.com/netty/netty-tcnative https://github.com/netty/netty-tcnative for example