#include "test.h" void test_class(char *classname) { jclass test_class; jobject test_object; printf("'%s' ", classname); test_class = ej_FindClass(ej_adjust_classname(classname)); if (test_class != NULL) { test_object = ej_NewObject(test_class); if (test_object != NULL) { printf("OK\n", classname); } else { check_exception(); printf("Error creating test object\n", classname); } } else { check_exception(); printf("Error loading test class\n", classname); } } int main() { jint res; printf("Initializing JVM\n"); res = ej_init_jvm(); if (res == 0) { printf("JVM initialized\n"); test_class("java/lang/String"); // test_class("net/ecodigit/db/TEAPOPAuth"); // test_class("com/ivanfm/util/NetUtil"); // test_class("com/ivanfm/db/Drivers"); // test_class("com/ivanfm/util/IFMutil"); test_class("java/sql/Connection"); // test_class("java/lang/Integer"); } else { printf("Error initializing JVM : %d\n", res); } }