2007-02-13 Andrew Haley <aph@redhat.com>
[gcc.git] / libjava / testsuite / libjava.jni / noclass.java
1 // Test to make sure JNI implementation catches exceptions.
2
3 public class noclass
4 {
5 static
6 {
7 System.loadLibrary ("noclass");
8 }
9
10 public static native void find_it ();
11
12 public static void main (String[] args)
13 {
14 try
15 {
16 find_it ();
17 }
18 catch (Throwable _)
19 {
20 // If find_it() causes a crash, or doesn't throw an exception,
21 // we won't be running this next line.
22 System.out.println ("Ok");
23 }
24 }
25 }