Skip to content

Instantly share code, notes, and snippets.

@rileyJones
Last active July 27, 2017 21:42
Show Gist options
  • Save rileyJones/4e9c713ebe2c963408d9a86901eacb14 to your computer and use it in GitHub Desktop.
Save rileyJones/4e9c713ebe2c963408d9a86901eacb14 to your computer and use it in GitHub Desktop.
ClassLoader classLoader = new URLClassLoader(new URL[]{new URL("jar:file:/standard.jar!/")});URL url = classLoader.getResource("StandardPlugin.class");JarURLConnection connection = (JarURLConnection) url.openConnection();JarFile file = connection.getJarFile();String jarPath = file.getName();manager.addClass(classLoader.loadClass(jarPath));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment