iface.java 429 B

12345678910111213141516171819202122232425262728
  1. // JNI calls via an interface method were broken in a couple releases.
  2. interface mycomp
  3. {
  4. int compareTo(Object x);
  5. }
  6. public class iface implements mycomp
  7. {
  8. static
  9. {
  10. System.loadLibrary("iface");
  11. }
  12. public int compareTo (Object x)
  13. {
  14. System.out.println ("hi maude");
  15. return 3;
  16. }
  17. public native void doCalls(Object x);
  18. public static void main (String[] args)
  19. {
  20. new iface().doCalls(args);
  21. }
  22. }