-
-
Save aaronbartell/03aebc039b4ab390947c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PaseExample1 { | |
public static void main(String args[]) { | |
PaseExample1 pe1 = new PaseExample1("String for PaseExample1"); | |
pe1.printString(); | |
} | |
String str; | |
PaseExample1(String s) { | |
str = s; | |
} | |
//----------------------------------------------------------------- | |
public void printString() { | |
String result = getStringNative(); | |
System.out.println("Value of str is '" + result + "'"); | |
} | |
// This calls getStringCallback through JNI. | |
public native String getStringNative(); | |
// Called by getStringNative via JNI. | |
public String getStringCallback() { | |
return str; | |
} | |
static { | |
System.loadLibrary("PaseExample1"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment