State of Practices of Java Native Interface. Grichi, M., Abidi, M., Gu�h�neuc, Y., & Khomh, F. In Kontogiannis, K. & Enenkel, R., editors, Proceedings of the 29<sup>th</sup> IBM Centers for Advanced Studies Conference (CASCON), pages 274&ndash;283, October, 2019. ACM Press. 15 pages.
State of Practices of Java Native Interface [pdf]Paper  abstract   bibtex   
The use of the Java Native Interface (JNI) allows taking advantage of the existing libraries written in different programming languages for code reuse, performance, and security. Despite the importance of JNI in development, practices on its usages are not well studied yet. In this paper, we investigated the usage of JNI in 100 open source systems collected from OpenHub and Github, around 8k of source code files combined between Java and C/C++, including the Java class libraries part of the JDK v9. We identified the state of the practice in JNI systems by semi-automatically and manually analyzing the source code. Our qualitative analysis shows eleven JNI practices where they are mainly related to loading libraries, implementing native methods, exception management, return types, and local/global references management. Basing on our findings, we provided some suggestions and recommendations to developers to facilitate the debugging tasks of JNI in multi-language systems, which can also help them to deal with the Java and C memory.

Downloads: 0