2015-04-13 13:23:13 +00:00
|
|
|
/*
|
2015-09-30 13:21:23 +03:00
|
|
|
* Author: Brendan Le Foll <brendan.le.foll@intel.com>
|
2015-04-13 13:23:13 +00:00
|
|
|
* Copyright (c) 2014 Intel Corporation.
|
2015-09-30 13:21:23 +03:00
|
|
|
* Author: Petre Eftime <petre.p.eftime@intel.com>
|
|
|
|
|
* Copyright (c) 2015 Intel Corporation.
|
2015-04-13 13:23:13 +00:00
|
|
|
*
|
2019-05-09 09:47:11 -07:00
|
|
|
* SPDX-License-Identifier: MIT
|
2015-04-13 13:23:13 +00:00
|
|
|
*/
|
|
|
|
|
|
2015-09-30 13:21:23 +03:00
|
|
|
//! [Interesting]
|
|
|
|
|
import mraa.mraa;
|
|
|
|
|
|
2015-04-13 13:23:13 +00:00
|
|
|
public class Example {
|
|
|
|
|
static {
|
|
|
|
|
try {
|
|
|
|
|
System.loadLibrary("mraajava");
|
|
|
|
|
} catch (UnsatisfiedLinkError e) {
|
|
|
|
|
System.err.println(
|
|
|
|
|
"Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" +
|
|
|
|
|
e);
|
|
|
|
|
System.exit(1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public static void main(String argv[]) {
|
2015-09-30 13:21:23 +03:00
|
|
|
String board = mraa.getPlatformName();
|
|
|
|
|
String version = mraa.getVersion();
|
|
|
|
|
System.out.println("hello mraa");
|
|
|
|
|
System.out.println(String.format("Version: %s", version));
|
|
|
|
|
System.out.println(String.format("Running on %s", board));
|
2015-04-13 13:23:13 +00:00
|
|
|
};
|
|
|
|
|
}
|
2015-09-30 13:21:23 +03:00
|
|
|
//! [Interesting]
|