import source from 1.3.40
[external/swig.git] / Examples / java / multimap / runme.java
1
2 public class runme {
3
4   static {
5     try {
6       System.loadLibrary("example");
7     } catch (UnsatisfiedLinkError e) {
8       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);
9       System.exit(1);
10     }
11   }
12
13   public static void main(String argv[]) {
14
15     // Call our gcd() function
16     int x = 42;
17     int y = 105;
18     int g = example.gcd(x,y);
19     System.out.println("The gcd of " + x + " and " + y + " is " + g);
20     
21     // Call the gcdmain() function
22     String[] args = {"gcdmain","42","105"};
23     example.gcdmain(args);
24     
25     // Call the count function
26     System.out.println(example.count("Hello World", 'l'));
27     
28     // Call the capitalize function
29     String[] capitalizeMe = {"hello world"};
30     example.capitalize(capitalizeMe);
31     System.out.println(capitalizeMe[0]);
32   }
33 }
34
35
36
37
38
39
40