Sample code which throws Java exceptions from native code (Mac OS X)