File myJarFile = "D:/Java/libraries/theJarFile.jar"; JarDependencies depend = new JarDependencies(<myJarFile>);It is also possible to create it by providing the directory, and the root name of the file name. For example:
File myDirectory = "D:/Java/libraries"; JarDependencies depend = new JarDependencies(<myDirectory>, <"theJarFile">);
JarDependencies depend = new JarDependencies(<myJarFile>); JarDependencies anotherDepend = new JarDependencies(<aSecondJarFile>); boolean isDependingOn = depend.isDependingOn(anotherDepend);
JarDependencies
has dependencies to a set of packages. Set<String> set = new HashSet<>(); set.add("java.util"); DependencyChecker checker = new DependencyChecker(); boolean dependsOn = checker.check(<myJarFile>, set);
JarDependencies depend = new JarDependencies(<myJarFile>); boolean isDependingOnSwing = DependencyUtilities.dependOnSwing(depend); boolean isDependingOnJavaFX = DependencyUtilities.dependOnJavaFX(depend);
DependencyPrinter
class allows to print the list of dependencies from one JarDependency
and anotherJavaModulesUtilities
class allows to check that one or several Jar files are compatible with the Java module systemCompactProfiles
class allows to check that one Jar file is compatible with a specific Java compact profile (from compact1 to compact3)JarManifestUtilities
class allows to check that the jar files declared in the Class-Path
attribute in a Jar file Manifest existCopyright 2019 Herve Girod. All Rights Reserved. Documentation and source under the LGPL v2 licence