wwwjames / jni-maven-example

A small example of to call JNI methods from Java and vice versa using Native Maven Plugin

Home Page:https://medium.com/geekculture/a-simple-guide-to-java-native-interface-jni-using-native-maven-plugin-e01f4077a8a5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReadMe.md

Cloned java native code example originally from dredwardhyde/jni-maven-example.

Usage

  • mvn compile
  • java -Djava.library.path=target -cp target/classes com.jni.example.JniWrapper

Modifications

  • Updated .gitignore for generated header and IntelliJ ide directory.
  • Updated maven pom version to 1.1-SNAPSHOT, added removal of generated headers, added GCC debug flag for compling MacOS native code.
  • Added artifacts/IntelliJ.

Original ReadMe.md

How to call JNI methods from Java and vice versa

medium

Useful snippets:

Please note that on Windows 10 you need to build and install in local maven repository this project to get Microsoft Visual Studio 2017 support by native-maven-plugin

About

A small example of to call JNI methods from Java and vice versa using Native Maven Plugin

https://medium.com/geekculture/a-simple-guide-to-java-native-interface-jni-using-native-maven-plugin-e01f4077a8a5


Languages

Language:C 69.2%Language:Java 30.8%