~ubuntu-branches/ubuntu/warty/swig1.3/warty

« back to all changes in this revision

Viewing changes to Examples/test-suite/java/imports_runme.java

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Landschoff
  • Date: 2002-03-29 01:56:07 UTC
  • Revision ID: james.westby@ubuntu.com-20020329015607-c0wt03xu8oy9ioj7
Tags: upstream-1.3.11
ImportĀ upstreamĀ versionĀ 1.3.11

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
}