public class JarHell extends 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 ESModifier and Type | Method and Description |
---|---|
static void |
checkJarHell()
Checks the current classpath for duplicate classes
|
static void |
checkJarHell(URL[] urls)
Checks the set of URLs for duplicate classes
|
static void |
checkJavaVersion(String resource,
String targetVersion)
Checks that the java specification version
targetVersion
required by resource is compatible with the current installation. |
static void |
checkVersionFormat(String targetVersion) |
static void |
main(String[] args)
Simple driver class, can be used eg.
|
static URL[] |
parseClassPath()
Parses the classpath into an array of URLs
|
public static void main(String[] args) throws Exception
Exception
public static void checkJarHell() throws Exception
IllegalStateException
- if jar hell was foundException
public static URL[] parseClassPath()
IllegalStateException
- if the classpath contains empty elementspublic static void checkJarHell(URL[] urls) throws Exception
IllegalStateException
- if jar hell was foundException
public static void checkVersionFormat(String targetVersion)
Copyright © 2009–2016. All rights reserved.