Working dex2oat and oatexec

adb shell dex2oatd --dex-file=/system/framework/core.jar     --image=/system/framework/boot.oat --base=0x50000000 "'--method=Ljava/lang/System;logI(Ljava/lang/String;)V'" "'--method=Ljava/lang/System;log(CLjava/lang/String;Ljava/lang/Throwable;)V'"
adb shell dex2oatd --boot-dex-file=/system/framework/core.jar --boot=/system/framework/boot.oat --dex-file=/system/framework/art-test-dex-HelloWorld.jar --image=/system/framework/art-test-dex-HelloWorld.oat
adb shell oatexecd -Xbootclasspath:/system/framework/core.jar -Xbootimage:/system/framework/boot.oat -classpath /system/framework/art-test-dex-HelloWorld.jar -Ximage:/system/framework/art-test-dex-HelloWorld.oat HelloWorld

09-05 17:58:18.912  2385  2385 I System  : Hello, world!

Change-Id: I53e534068584f0c3a837313e4d517a0e4a7154fc
diff --git a/src/jni_internal.cc b/src/jni_internal.cc
index a75a365..bd1ccec 100644
--- a/src/jni_internal.cc
+++ b/src/jni_internal.cc
@@ -207,6 +207,7 @@
   // Pass everything as arguments
   const Method::InvokeStub* stub = method->GetInvokeStub();
   JValue result;
+
   if (method->HasCode() && stub != NULL) {
     (*stub)(method, receiver, self, args, &result);
   } else {
@@ -2566,11 +2567,11 @@
   Runtime* runtime = Runtime::Create(options, ignore_unrecognized);
   if (runtime == NULL) {
     return JNI_ERR;
-  } else {
-    *p_env = Thread::Current()->GetJniEnv();
-    *p_vm = runtime->GetJavaVM();
-    return JNI_OK;
   }
+  runtime->Start();
+  *p_env = Thread::Current()->GetJniEnv();
+  *p_vm = runtime->GetJavaVM();
+  return JNI_OK;
 }
 
 extern "C" jint JNI_GetCreatedJavaVMs(JavaVM** vms, jsize, jsize* vm_count) {