noclass.java 440 Bytes
Newer Older
Tom Tromey committed
1 2 3 4 5 6 7 8 9 10 11 12 13
// Test to make sure JNI implementation catches exceptions.

public class noclass
{
  static
  {
    System.loadLibrary ("noclass");
  }

  public static native void find_it ();

  public static void main (String[] args)
  {
14 15 16 17 18 19 20 21 22 23
    try
      {
	find_it ();
      }
    catch (Throwable _)
      {
	// If find_it() causes a crash, or doesn't throw an exception,
	// we won't be running this next line.
	System.out.println ("Ok");
      }
Tom Tromey committed
24 25
  }
}