VM.sysWrite("JNI ERROR: RegisterNatives not implemented yet."); VM.sysExit(VM.exitStatusUnsupportedInternalOp); return -1;
try {  Class jcls = (Class) env.getJNIRef(classJREF); VM_Type type = java.lang.JikesRVMSupport.getTypeForClass(jcls); if (!type.isClassType()) { env.recordException(new NoSuchMethodError()); return 0; }  VM_Class klass = type.asClass(); if (!klass.isInitialized()) { VM_Runtime.initializeClassForDynamicLink(klass); }   VM_NativeMethod[] methods = new VM_NativeMethod[nmethods]; AddressArray symbols = AddressArray.create(nmethods);  Address curMethod = methodsAddress; for (int i = 0; i < nmethods; i++) { String methodString = VM_JNIHelpers.createStringFromC(curMethod.loadAddress()); VM_Atom methodName = VM_Atom.findOrCreateAsciiAtom(methodString); String sigString = VM_JNIHelpers.createStringFromC(curMethod.loadAddress(Offset.fromInt(BYTES_IN_ADDRESS))); VM_Atom sigName  = VM_Atom.findOrCreateAsciiAtom(sigString);   VM_Method meth = klass.findDeclaredMethod(methodName, sigName);  if (meth == null || !meth.isNative()) { env.recordException(new NoSuchMethodError(klass + ": " + methodName + " " + sigName)); return -1; } methods[i] = (VM_NativeMethod)meth; symbols.set(i, curMethod.loadAddress(Offset.fromInt(BYTES_IN_ADDRESS * 2))); curMethod = curMethod.add(3 * BYTES_IN_ADDRESS); }   for (int i = 0; i < nmethods; i++) { methods[i].registerNativeSymbol(symbols.get(i)); }  return 0; } catch (Throwable unexpected) { if (traceJNI) unexpected.printStackTrace(System.err); env.recordException(unexpected); return -1; }
  private static int RegisterNatives(VM_JNIEnvironment env) {    if (traceJNI) VM.sysWrite("JNI called: RegisterNatives  \n");    VM.sysWrite("JNI ERROR: RegisterNatives not implemented yet.");    VM.sysExit(VM.exitStatusUnsupportedInternalOp);    return -1;   }