aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/java/template_construct_runme.java
diff options
context:
space:
mode:
authorAlistair Delva <adelva@google.com>2024-04-10 14:15:29 -0700
committerAlistair Delva <adelva@google.com>2024-04-11 12:58:28 -0700
commitd0f0f90be16c2ac553b5fa08512045273135147a (patch)
tree5d9ebb7a04807ea8a609ddd18b0162bc87530e4b /Examples/test-suite/java/template_construct_runme.java
parent6ffc1dbf29ba98c4d8aa71ebc9b484e973fe1030 (diff)
downloadswig-main.tar.gz
Change-Id: I47cef2be94299220d80265d949a95b58eee2c23b
Diffstat (limited to 'Examples/test-suite/java/template_construct_runme.java')
-rw-r--r--Examples/test-suite/java/template_construct_runme.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/Examples/test-suite/java/template_construct_runme.java b/Examples/test-suite/java/template_construct_runme.java
new file mode 100644
index 000000000..c4e8e35d9
--- /dev/null
+++ b/Examples/test-suite/java/template_construct_runme.java
@@ -0,0 +1,24 @@
+
+import template_construct.*;
+
+public class template_construct_runme {
+
+ static {
+ try {
+ System.loadLibrary("template_construct");
+ } 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[]) {
+ Foo_int fi = new Foo_int(0);
+ fi.delete();
+ Foo_short fs = new Foo_short();
+ fs.delete();
+ fs = new Foo_short();
+ fs.delete();
+ }
+}
+