diff --git a/src/classpath-common.h b/src/classpath-common.h index 45b93850ed..3ca61210a0 100644 --- a/src/classpath-common.h +++ b/src/classpath-common.h @@ -172,6 +172,8 @@ loadLibrary(Thread* t, const char* path, const char* name, bool mapName, // library is built in to this executable if (runOnLoad and not t->m->triedBuiltinOnLoad) { t->m->triedBuiltinOnLoad = true; + // todo: release the classLock before calling this to + // avoid the possibility of deadlock: runOnLoadIfFound(t, t->m->libraries); } return t->m->libraries;