public static void main(String[] args) {
// TODO Auto-generated method stub
ClassLoader loder = ClassLoaderText.class.getClassLoader();
while(loder!=null)
{
System.out.println(loder.toString());
loder = loder.getParent();
}
}
他出现这种错误:
怎么办?
java.lang.NoClassDefFoundError: ClassLoad/ClassLoaderText
Caused by: java.lang.ClassNotFoundException: ClassLoad.ClassLoaderText
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:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Exception in thread "main" |
|