Support built-in jars when wusing multi-library

This commit is contained in:
Alexey Pelykh 2013-02-02 12:27:36 +02:00
parent 0ff703d1c0
commit 1d60ababd3

View File

@ -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<const char**>