diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/runtime.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/runtime.cc b/src/runtime.cc index e1950f34d2..424b6f7898 100644 --- a/src/runtime.cc +++ b/src/runtime.cc @@ -373,11 +373,13 @@ void Runtime::Start() { void Runtime::StartDaemonThreads() { signal_catcher_ = new SignalCatcher; - Class* c = class_linker_->FindSystemClass("Ljava/lang/Daemons;"); + Thread* self = Thread::Current(); + JNIEnv* env = self->GetJniEnv(); + jclass c = env->FindClass("java/lang/Daemons"); CHECK(c != NULL); - Method* m = c->FindDirectMethod("start", "()V"); - CHECK(m != NULL); - m->Invoke(Thread::Current(), NULL, NULL, NULL); + jmethodID mid = env->GetStaticMethodID(c, "start", "()V"); + CHECK(mid != NULL); + env->CallStaticVoidMethod(c, mid); } bool Runtime::IsStarted() { |