#include #include "easy_java.h" #define print_toString(format, obj) \ printf(format, ej_GetStringUTFChars(ej_toString(obj), NULL)); void check_exception() { jthrowable jt = ej_CheckException(); if (jt != NULL) { print_toString("Exception : '%s'\n", jt); ej_ExceptionDescribe(); } }