-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
6
-
generic, x86, sparc
-
generic, linux, solaris_10, windows_xp
public class test {
public static void main(String[] args) throws Exception {
String[] s = new String[] { "123" };
String clName = s.getClass().getName();
test.class.getClassLoader().loadClass(clName);
}
}
This runs fine on JDK 1.5, but throws this exception on JDK 6.0:
Exception in thread "main" java.lang.ClassNotFoundException: [Ljava.lang.String;
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at test.main(test.java:7)
- duplicates
-
JDK-6446627 Reading Serialized arrays of objects throws ClassNotFoundException
-
- Closed
-
-
JDK-6500212 (cl) ClassLoader.loadClass() fails when byte array is passed
-
- Closed
-
-
JDK-6587176 ClassLoader.findSystemClass() throws CNFException for primitive class names
-
- Closed
-
-
JDK-6466061 JOnAS 4.7.6 ClassNotFoundException on JDK 6, but works well on JDK 4 and JDK 5
-
- Closed
-
-
JDK-6516909 (cl spec) ClassLoader.loadClass() clarification to indicate it shouldn't be used for array classes
-
- Closed
-
- relates to
-
JDK-4976356 (cl) S1AS 7 calling ClassLoader.loadClass with array syntax
-
- Closed
-
-
JDK-6516909 (cl spec) ClassLoader.loadClass() clarification to indicate it shouldn't be used for array classes
-
- Closed
-