diff --git a/Source/Library.c b/Source/Library.c new file mode 100644 index 0000000..2f736b2 --- /dev/null +++ b/Source/Library.c @@ -0,0 +1,12 @@ +// Copyright (c) TribuFu. All Rights Reserved + +#include +#include "TribuFu.h" +#include "Library.h" + +JNIEXPORT jstring JNICALL Java_tribufu_TribuFu_Hello(JNIEnv *, jobject, jstring) +{ + char *result = Hello("C"); + + return result; +} diff --git a/Source/Library.h b/Source/Library.h new file mode 100644 index 0000000..6f47672 --- /dev/null +++ b/Source/Library.h @@ -0,0 +1,13 @@ +// Copyright (c) TribuFu. All Rights Reserved + +#pragma once + +#include +#include "TribuFu.h" + +/* + * Class: tribufu_TribuFu + * Method: Hello + * Signature: (Ljava/lang/String;)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_tribufu_TribuFu_Hello(JNIEnv *, jobject, jstring); diff --git a/Source/TribuFu.java b/Source/TribuFu.java new file mode 100644 index 0000000..813884f --- /dev/null +++ b/Source/TribuFu.java @@ -0,0 +1,15 @@ +// Copyright (c) TribuFu. All Rights Reserved + +package tribufu; + +public class TribuFu { + /** + * A native method that is implemented by the 'TribuFu' native library. + */ + public native String Hello(String input); + + // Used to load the 'TribuFu' library on application startup. + public void LoadLibrary() { + System.loadLibrary("TribuFu"); + } +}