cmd/gomobile: call System.loadLibrary for .aar

Change-Id: I3fd099910cfb1fe112ded4386905d370acfea002
Reviewed-on: https://go-review.googlesource.com/11816
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
David Crawshaw
2015-07-06 22:21:32 +00:00
parent ddd9618c5b
commit 5ced61ace7
3 changed files with 23 additions and 2 deletions
+8
View File
@@ -15,6 +15,14 @@ import java.util.concurrent.Executors;
// Used by automatically generated language bindings to talk to Go.
public class Seq {
static {
// Look for the shim class auto-generated by gomobile bind.
// Its only purpose is to call System.loadLibrary.
try {
Class.forName("go.LoadJNI");
} catch (ClassNotFoundException e) {
// Ignore, assume the user will load JNI for it.
}
initSeq();
new Thread("GoSeq") {
public void run() { Seq.receive(); }