(JNI was originally designed for local compiled languages, especially C and C , but it does not prevent you from using other languages. You just need to call the supported ones. Using java to interact with locally compiled code usually loses platform portability. However, in some cases, it is affordable or even necessary to do so. For example, use some old libraries to interact with hardware and operating systems, perhaps to improve the function of programs. The JNI standard at least ensures that the local code can work in any Java virtual machine environment.)