don't throw an error if the mawt library can't be loaded

This commit is contained in:
Joel Dice 2013-02-27 11:34:43 -07:00
parent 20cb5c7068
commit 3c1db46c57
2 changed files with 4 additions and 4 deletions

View File

@ -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);
}

View File

@ -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