public class JarHell
extends java.lang.Object
This class checks for incompatibilities in the following ways:
X-Compile-Target-JDK value in the jar
manifest is compatible with current JREX-Compile-Elasticsearch-Version value in
the jar manifest is compatible with the current ES| Modifier and Type | Method and Description |
|---|---|
static void |
checkJarHell()
Checks the current classpath for duplicate classes
|
static void |
checkJarHell(java.net.URL[] urls)
Checks the set of URLs for duplicate classes
|
static void |
checkJavaVersion(java.lang.String resource,
java.lang.String targetVersion)
Checks that the java specification version
targetVersion
required by resource is compatible with the current installation. |
static void |
checkVersionFormat(java.lang.String targetVersion) |
static void |
main(java.lang.String[] args)
Simple driver class, can be used eg.
|
static java.net.URL[] |
parseClassPath()
Parses the classpath into an array of URLs
|
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exceptionpublic static void checkJarHell()
throws java.lang.Exception
java.lang.IllegalStateException - if jar hell was foundjava.lang.Exceptionpublic static java.net.URL[] parseClassPath()
java.lang.IllegalStateException - if the classpath contains empty elementspublic static void checkJarHell(java.net.URL[] urls)
throws java.lang.Exception
java.lang.IllegalStateException - if jar hell was foundjava.lang.Exceptionpublic static void checkVersionFormat(java.lang.String targetVersion)
public static void checkJavaVersion(java.lang.String resource,
java.lang.String targetVersion)
targetVersion
required by resource is compatible with the current installation.