UrlClassLoader can not load the class in the jar

28 Views Asked by At

I use URLClassLoader to load the class,and I am sure that the class is int the jar, but this exception has occurred:

exception:

and the code is here:

ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
URLClassLoader urlClassLoader = new URLClassLoader(new URL[] { jarURL }, classLoader);
Class.forName("com.demo.bitmap.udf.BitmapAndUDF", true, urlClassLoader);

and the classes in jar is: classes in jar

I want to know why ?

0

There are 0 best solutions below