Last active
February 13, 2019 02:03
-
-
Save moods445/b595e412155a9f1733e1bb061c0f642a to your computer and use it in GitHub Desktop.
Custom ClassLoader #Java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JarFile jarFile = new JarFile(jarFilePath.toFile()); | |
URLClassLoader jarClassLoader = new URLClassLoader( | |
new URL[]{jarFilePath.toUri().toURL()}, | |
this.getClass().getClassLoader() | |
); | |
Class tClass = Class.forName(className, true, classLoader); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment