2000-02-27 22:42:40 +01:00
|
|
|
// 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)
|
|
|
|
{
|
2000-04-20 21:49:14 +02:00
|
|
|
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");
|
|
|
|
}
|
2000-02-27 22:42:40 +01:00
|
|
|
}
|
|
|
|
}
|