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.util.Set<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.util.Set<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.io.IOException,
java.net.URISyntaxException
java.lang.IllegalStateException - if jar hell was foundjava.io.IOExceptionjava.net.URISyntaxExceptionpublic static java.util.Set<java.net.URL> parseClassPath()
java.lang.IllegalStateException - if the classpath contains empty elementspublic static void checkJarHell(java.util.Set<java.net.URL> urls)
throws java.net.URISyntaxException,
java.io.IOException
java.lang.IllegalStateException - if jar hell was foundjava.net.URISyntaxExceptionjava.io.IOExceptionpublic 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.