aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/net/URLClassLoader.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/net/URLClassLoader.java')
-rw-r--r--libjava/java/net/URLClassLoader.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/libjava/java/net/URLClassLoader.java b/libjava/java/net/URLClassLoader.java
index ada4b63..06db7d5 100644
--- a/libjava/java/net/URLClassLoader.java
+++ b/libjava/java/net/URLClassLoader.java
@@ -1078,7 +1078,12 @@ public class URLClassLoader extends SecureClassLoader
resource = loader.getResource(resourceName);
}
if (resource == null)
- throw new ClassNotFoundException(className + " not found in " + this);
+ {
+ String message = className + " not found";
+ if (runtimeInitialized())
+ message += " in " + this;
+ throw new ClassNotFoundException(message);
+ }
// Try to read the class data, create the CodeSource, Package and
// construct the class (and watch out for those nasty IOExceptions)
@@ -1437,4 +1442,11 @@ public class URLClassLoader extends SecureClassLoader
return loader;
}
}
+
+ /**
+ * Tell whether runtime initialization is complete.
+ *
+ * @return whether runtime initialization is complete.
+ */
+ private static native boolean runtimeInitialized();
}