2007-02-13 Andrew Haley <aph@redhat.com>
[gcc.git] / libjava / testsuite / libjava.jni / iface.java
1 // JNI calls via an interface method were broken in a couple releases.
2
3 interface mycomp
4 {
5 int compareTo(Object x);
6 }
7
8 public class iface implements mycomp
9 {
10 static
11 {
12 System.loadLibrary("iface");
13 }
14
15 public int compareTo (Object x)
16 {
17 System.out.println ("hi maude");
18 return 3;
19 }
20
21 public native void doCalls(Object x);
22
23 public static void main (String[] args)
24 {
25 new iface().doCalls(args);
26 }
27 }