diff -r 9a01b060fab6 src/native/native.cpp --- a/src/native/native.cpp Thu May 28 10:33:15 2009 +0200 +++ b/src/native/native.cpp Sun May 31 17:28:42 2009 +0200 @@ -393,13 +393,24 @@ // Try to find the symbol. void* symbol = NULL; + // If not found already, try to find the native method symbol in + // the native methods registered with the VM. + if (symbol == NULL) { + symbol = find_registered_method(m); + + if (symbol != NULL) + if (opt_verbosejni) + printf("internal ]\n"); + } + #if defined(ENABLE_DL) // Get the classloader. classloader_t* classloader = class_get_classloader(m->clazz); // Resolve the native method name from the native libraries. NativeLibraries& libraries = VM::get_current()->get_nativelibraries(); - symbol = libraries.resolve_symbol(name, classloader); + if (symbol == NULL) + symbol = libraries.resolve_symbol(name, classloader); if (symbol == NULL) symbol = libraries.resolve_symbol(newname, classloader); @@ -437,16 +448,6 @@ printf("JNI ]\n"); #endif - // If not found already, try to find the native method symbol in - // the native methods registered with the VM. - if (symbol == NULL) { - symbol = find_registered_method(m); - - if (symbol != NULL) - if (opt_verbosejni) - printf("internal ]\n"); - } - #if defined(ENABLE_JVMTI) /* fire Native Method Bind event */ if (jvmti) jvmti_NativeMethodBind(m, f, &f);