转载自:https://www.cnblogs.com/hopefu/p/4813752.html
使用方法:
File file = new File(jar文件全路径);
URL url = file.toURL();
URLClassLoader loader = new URLClassLoader(new URL[] { url });
Class tidyClazz = loader.loadClass(所需class的含包名的全名);
2024-04-12 16:41:14
转载自:https://www.cnblogs.com/hopefu/p/4813752.html
使用方法:
File file = new File(jar文件全路径);
URL url = file.toURL();
URLClassLoader loader = new URLClassLoader(new URL[] { url });
Class tidyClazz = loader.loadClass(所需class的含包名的全名);