Mercurial > hg > graal-compiler
changeset 21513:d760a7d64801
Graal loader: load all .jar files (regardless of graal prefix)
author | Gilles Duboscq <gilles.m.duboscq@oracle.com> |
---|---|
date | Wed, 06 May 2015 16:54:59 +0200 |
parents | d1baf7d5230a |
children | b426469fadb7 |
files | graal/com.oracle.graal.hotspot.loader/src/com/oracle/graal/hotspot/loader/Factory.java src/share/vm/runtime/arguments.cpp |
diffstat | 2 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.loader/src/com/oracle/graal/hotspot/loader/Factory.java Tue May 05 17:56:23 2015 +0200 +++ b/graal/com.oracle.graal.hotspot.loader/src/com/oracle/graal/hotspot/loader/Factory.java Wed May 06 16:54:59 2015 +0200 @@ -28,7 +28,7 @@ /** * Utility to create and register a separate class loader for loading Graal classes (i.e., those in - * found in lib/graal/graal*.jar). + * found in jars in lib/graal). */ public class Factory { @@ -69,7 +69,7 @@ List<URL> urls = new ArrayList<>(); for (String fileName : graal.list()) { - if (fileName.startsWith("graal") && fileName.endsWith(".jar")) { + if (fileName.endsWith(".jar")) { File file = new File(graal, fileName); if (file.isDirectory()) { continue;
--- a/src/share/vm/runtime/arguments.cpp Tue May 05 17:56:23 2015 +0200 +++ b/src/share/vm/runtime/arguments.cpp Wed May 06 16:54:59 2015 +0200 @@ -3621,7 +3621,7 @@ #ifdef GRAAL if (!UseGraalClassLoader) { - // Append lib/graal/graal*.jar to boot class path + // Append lib/graal/*.jar to boot class path char graalDir[JVM_MAXPATHLEN]; const char* fileSep = os::file_separator(); jio_snprintf(graalDir, sizeof(graalDir), "%s%slib%sgraal", Arguments::get_java_home(), fileSep, fileSep); @@ -3632,9 +3632,7 @@ while ((entry = os::readdir(dir, (dirent *) dbuf)) != NULL) { const char* name = entry->d_name; const char* ext = name + strlen(name) - 4; - if (ext > name && strcmp(ext, ".jar") == 0 - && strlen(name) > strlen("graal") - && strncmp(name, "graal", strlen("graal")) == 0) { + if (ext > name && strcmp(ext, ".jar") == 0) { char fileName[JVM_MAXPATHLEN]; jio_snprintf(fileName, sizeof(fileName), "%s%s%s", graalDir, fileSep, name); scp_p->add_suffix(fileName);