import source from 1.3.40
[external/swig.git] / Examples / test-suite / java / imports_runme.java
1
2 // This is the imports runtime testcase. It shows that the %import directive
3 // is working correctly
4
5 import imports.*;
6
7 public class imports_runme {
8
9   static {
10     try {
11         System.loadLibrary("imports_a");
12         System.loadLibrary("imports_b");
13     } catch (UnsatisfiedLinkError e) {
14       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);
15       System.exit(1);
16     }
17   }
18
19   public static void main(String argv[]) {
20
21     B b = new B();
22     b.hello(); //call member function in A which is in a different SWIG generated library.
23  }
24 }