Java enhancement proposal would preserve the status of the Java Native Interface as a standard way to interoperate with native code, while disallowing interoperation with native code by default. Credit: jazz3311 / Shutterstock A proposal to preserve the status of Java Native Interface (JNI) as a standard way to interoperate with native code is moving forward in the Java community. Originally created in May 2023 and updated on July 16, the JDK enhancement proposal (JEP), called “Prepare to Restrict the Use of JNI,” is slated for JDK 24, which would not likely arrive until March 2025. The proposal calls for warnings about uses of JNI and adjusting the Foreign Function & Memory (FFM) API to issue warnings in a consistent manner. These warnings are intended to prepare developers for a future release that disallows interoperation with native code by default, whether via JNI or the FFM API. As of that release, developers will have to explicitly enable the use of JNI and the FFM at startup. In addition, the plan would align the use of JNI and the FFM API so that library maintainers can migrate from one to the other without requiring developers to change any command-line options. Non-goals include deprecating JNI or removing JNI from the Java platform and restricting behavior of native code called via JNI. As an example, all of the native JNI functions would remain usable by native code. JNI was introduced in JDK 1.1, which dates back to February 1997, as the primary means for interoperating between Java code and native code, typically written in C. The interface allows Java code to call native code (a downcall) and native code to call Java code (an upcall). But any interaction between Java code and native code is risky because it could potentially compromise the integrity of applications and the Java platform itself. Based on the policy of integrity by default, all JDK features capable of breaking integrity by default must obtain explicit approval from the application’s developer. Related content feature What is Rust? Safe, fast, and easy software development Unlike most programming languages, Rust doesn't make you choose between speed, safety, and ease of use. Find out how Rust delivers better code with fewer compromises, and a few downsides to consider before learning Rust. By Serdar Yegulalp Nov 20, 2024 11 mins Rust Programming Languages Software Development how-to Kotlin for Java developers: Classes and coroutines Kotlin was designed to bring more flexibility and flow to programming in the JVM. Here's an in-depth look at how Kotlin makes working with classes and objects easier and introduces coroutines to modernize concurrency. By Matthew Tyson Nov 20, 2024 9 mins Java Kotlin Programming Languages analysis Azure AI Foundry tools for changes in AI applications Microsoft’s launch of Azure AI Foundry at Ignite 2024 signals a welcome shift from chatbots to agents and to using AI for business process automation. By Simon Bisson Nov 20, 2024 7 mins Microsoft Azure Generative AI Development Tools news Microsoft unveils imaging APIs for Windows Copilot Runtime Generative AI-backed APIs will allow developers to build image super resolution, image segmentation, object erase, and OCR capabilities into Windows applications. By Paul Krill Nov 19, 2024 2 mins Generative AI APIs Development Libraries and Frameworks Resources Videos