Skip to content, Skip to search

Changes

Uber-JAR

62 bytes added, 15:43, 16 October 2015
Discussion: Link NoSuchMethodError to its troubleshooting section
* Every time you need to update the version of the software, you must redeploy the entire uber-JAR (e.g., [[ImageJ]] is ~68 MB as of May 2015). If you bundle individual JAR components, you need only update those that changed. This issue is of particular relevance to Java applications deployed via Java Web Start, since it automatically downloads the latest available version of each JAR dependency; in that case, your application startup time will suffer if you use the uber-JAR.
* You cannot cherry-pick only the JARs containing the functionality you need, so your application's footprint may suffer from bloat.
* If downstream code relies on any of the same dependencies which are embedded in an unshaded uber-jar, you may run into trouble (e.g., <code>[[Troubleshooting#NoSuchMethodError_or_NoClassDefFoundError|NoSuchMethodError]]</code> for unshaded uber-JARs) with multiple copies of those dependencies on your classpath, especially if you need to use a different version of that dependency than is bundled with the uber-JAR.
As you can see, it is important to understand how use of the uber-JAR will affect your application. In particular, Java applications will likely be better served using the individual component JARs, ideally managed using a dependency management platform such as [http://maven.apache.org/ Maven] or [http://ant.apache.org/ivy/ Ivy]. But for non-Java applications, the uber-JAR may be sufficient to your needs.
Bureaucrat, emailconfirmed, incoming, administrator, uploaders
11,833
edits