Details
-
Bug
-
Resolution: Done
-
Minor
-
5.0.0.M1
-
None
-
None
Description
Running a test under JDK 1.6, a ClassNotFoundException would be thrown whenever a loadClass(className) was called while the className was the name of an array object, such as "[B" for byte array, etc. This is definitely new in JDK 1.6. The corresponding bug could be found at http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=2a9a78e4393c5e678a2c80f90c1?bug_id=6434149.
There are two workaround available:
1. setting an environment variable when starting VM: -Dsun.lang.ClassLoader.allowArraySyntax=true.
2. using Class.forName(className, initializationFlag, classLoader) instead of classLoader.loadClass(className).