0

I'm currently using Apache NetBeans 12.5, and I couldn't find a way to add a JNI. I need JNI for adding some c++ libraries to my project. The Project has been created with maven. Any clues?

Olaf Kock
  • 46,930
  • 8
  • 59
  • 90
Duz
  • 17
  • 2
  • 1
    What do you mean by "add JNI"? From the Java side you only need to designate methods as `native` and insert a `System.loadLibrary` call (optionally after extracting said library from your jar). Do you mean a Maven plugin for actually building the C++ wrappers into a library? – Botje Dec 16 '21 at 08:43
  • When I was looking to how add c++ libraries, it was written to add the libraries in netbeans like this: click on the .java file->tools->mixed development->generate JNI library project and so on. Sadly, I could not find this Tool in newer netbeans versions (this guide it was written under netbeans 8). My question maybe refers to how to add Maven plugins, but I do not really know. – Duz Dec 17 '21 at 09:53
  • 1
    I think your question is then basically "which maven plugin to use", which is OT for SO, but take a look at [maven-nar-plugin vs native-maven-plugin, which is better?](https://stackoverflow.com/questions/6622625/maven-nar-plugin-vs-native-maven-plugin-which-is-better) – Botje Dec 17 '21 at 11:04

0 Answers0