diff --git a/src/jnienv.cpp b/src/jnienv.cpp index c8f27fb0b7..4295c7e0a3 100644 --- a/src/jnienv.cpp +++ b/src/jnienv.cpp @@ -3729,7 +3729,7 @@ JNI_CreateJavaVM(Machine** m, Thread** t, void* args) unsigned heapLimit = 0; unsigned stackLimit = 0; - const char* bootLibrary = 0; + const char* bootLibraries = 0; const char* classpath = 0; const char* javaHome = AVIAN_JAVA_HOME; const char* embedPrefix = AVIAN_EMBED_PREFIX; @@ -3765,7 +3765,7 @@ JNI_CreateJavaVM(Machine** m, Thread** t, void* args) if (strncmp(p, BOOTSTRAP_PROPERTY "=", sizeof(BOOTSTRAP_PROPERTY)) == 0) { - bootLibrary = p + sizeof(BOOTSTRAP_PROPERTY); + bootLibraries = p + sizeof(BOOTSTRAP_PROPERTY); } else if (strncmp(p, CRASHDIR_PROPERTY "=", sizeof(CRASHDIR_PROPERTY)) == 0) { @@ -3819,9 +3819,16 @@ JNI_CreateJavaVM(Machine** m, Thread** t, void* args) *RUNTIME_ARRAY_BODY(bootClasspathBuffer) = 0; } + char* bootLibrary = bootLibraries ? strdup(bootLibraries) : 0; + char* bootLibraryEnd = bootLibrary ? strchr(bootLibrary, PATH_SEPARATOR) : 0; + if(bootLibraryEnd) + *bootLibraryEnd = 0; + Finder* bf = makeFinder (s, h, RUNTIME_ARRAY_BODY(bootClasspathBuffer), bootLibrary); Finder* af = makeFinder(s, h, classpath, bootLibrary); + if(bootLibrary) + free(bootLibrary); Processor* p = makeProcessor(s, h, true); const char** properties = static_cast