Skip to content

Instantly share code, notes, and snippets.

@masazdream
Last active December 17, 2015 05:48
Show Gist options
  • Select an option

  • Save masazdream/5560075 to your computer and use it in GitHub Desktop.

Select an option

Save masazdream/5560075 to your computer and use it in GitHub Desktop.
JNIでJavaからCPPを呼び出す<1>
package jp.sp.jni;
public class HelloWorldJNI {
static {
System.loadLibrary("HelloWorldJNI");
}
public native String sayHelloWorld();
public static void main(String[] args){
HelloWorldJNI hello = new HelloWorldJNI();
System.out.println(hello.sayHelloWorld());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment