PageRenderTime 15ms CodeModel.GetById 9ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/java/imports_runme.java

#
Java | 24 lines | 16 code | 6 blank | 2 comment | 0 complexity | 9a4296b8c63fe28686eb8eb56704ecdd MD5 | raw file
 1
 2// This is the imports runtime testcase. It shows that the %import directive
 3// is working correctly
 4
 5import imports.*;
 6
 7public 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}