mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-26 06:58:58 +08:00
dea4b2db61
* libjava.jni/throwit.out: Fixed output to be correct. * libjava.jni/noclass.java (main): `find_it' throws an exception. From-SVN: r33291
26 lines
440 B
Java
26 lines
440 B
Java
// 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)
|
|
{
|
|
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");
|
|
}
|
|
}
|
|
}
|