diff --git a/src/classpath-common.h b/src/classpath-common.h index c13d447386..ff063982e6 100644 --- a/src/classpath-common.h +++ b/src/classpath-common.h @@ -165,7 +165,7 @@ loadLibrary(Thread* t, const char* name) System::Library* loadLibrary(Thread* t, const char* path, const char* name, bool mapName, - bool runOnLoad) + bool runOnLoad, bool throw_ = true) { ACQUIRE(t, t->m->classLock); @@ -238,7 +238,7 @@ loadLibrary(Thread* t, const char* path, const char* name, bool mapName, if (runOnLoad) { runOnLoadIfFound(t, lib); } - } else { + } else if (throw_) { throwNew(t, Machine::UnsatisfiedLinkErrorType, "library not found: %s", name); } diff --git a/src/classpath-openjdk.cpp b/src/classpath-openjdk.cpp index 9ef7b4ccf8..7944ad0ee0 100644 --- a/src/classpath-openjdk.cpp +++ b/src/classpath-openjdk.cpp @@ -640,7 +640,7 @@ class MyClasspath : public Classpath { } virtual void - preBoot(Thread*) + preBoot(Thread* t) { // ignore } @@ -659,7 +659,7 @@ class MyClasspath : public Classpath { expect(t, loadLibrary(t, libraryPath, "verify", true, true)); expect(t, loadLibrary(t, libraryPath, "java", true, true)); # ifndef PLATFORM_WINDOWS - loadLibrary(t, libraryPath, "mawt", true, true); + loadLibrary(t, libraryPath, "mawt", true, true, false); # endif #endif // not AVIAN_OPENJDK_SRC