summaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.jni/iface.java
blob: c878ae362eaafcf147224449d492f5a3a72bda98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// JNI calls via an interface method were broken in a couple releases.

interface mycomp
{
  int compareTo(Object x);
}

public class iface implements mycomp
{
  static
  {
    System.loadLibrary("iface");
  }

  public int compareTo (Object x)
  {
    System.out.println ("hi maude");
    return 3;
  }

  public native void doCalls(Object x);

  public static void main (String[] args)
  {
    new iface().doCalls(args);
  }
}