summaryrefslogtreecommitdiffstats
path: root/Tests/JavaJavah/B.java
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@sap.com>2015-08-05 07:46:02 (GMT)
committerBrad King <brad.king@kitware.com>2015-08-21 13:30:08 (GMT)
commit4476feac33a88942ebbe2d988c7db4a575de716f (patch)
tree71b32923e9c02897260ed17b988786207d2b0cda /Tests/JavaJavah/B.java
parentf9865743ed942b1932d664d136a4ad505b724bf6 (diff)
downloadCMake-4476feac33a88942ebbe2d988c7db4a575de716f.zip
CMake-4476feac33a88942ebbe2d988c7db4a575de716f.tar.gz
CMake-4476feac33a88942ebbe2d988c7db4a575de716f.tar.bz2
UseJava: Add support for javah tool
Add a `create_javah` API.
Diffstat (limited to 'Tests/JavaJavah/B.java')
-rw-r--r--Tests/JavaJavah/B.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/JavaJavah/B.java b/Tests/JavaJavah/B.java
new file mode 100644
index 0000000..d731f39
--- /dev/null
+++ b/Tests/JavaJavah/B.java
@@ -0,0 +1,19 @@
+class B
+{
+ public B()
+ {
+ }
+
+ public native void printName();
+
+ static {
+ try {
+
+ System.loadLibrary("B");
+
+ } catch (UnsatisfiedLinkError e) {
+ System.err.println("Native code library failed to load.\n" + e);
+ System.exit(1);
+ }
+ }
+}