Package slash.common.jarinjar
Class ClassPathExtender
java.lang.Object
slash.common.jarinjar.ClassPathExtender
Creates a
ClassLoader that allows to include JARs in the classpath and in the file systems.
Works fine for Java 7 and 8 but not with Java 9 due to the classpath/module changes.- Author:
- Christian Pesch, inspired from https://github.com/mchr3k/swtjar/blob/master/src/org/swtjar/SWTLoader.java and http://stackoverflow.com/questions/1010919/adding-files-to-java-classpath-at-runtime
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExternalFile(File file) voidaddJarInJar(String fileName)
-
Constructor Details
-
ClassPathExtender
public ClassPathExtender()
-
-
Method Details
-
getClassLoader
-
addJarInJar
public void addJarInJar(String fileName) throws MalformedURLException, NoSuchMethodException, InvocationTargetException, IllegalAccessException -
addExternalFile
public void addExternalFile(File file) throws MalformedURLException, NoSuchMethodException, InvocationTargetException, IllegalAccessException
-