What is an uber JAR file?

Über is the German word for above or over (it’s actually cognate with the English over). Hence, in this context, an uber-jar is an “over-jar”, one level up from a simple JAR (a), defined as one that contains both your package and all its dependencies in one single JAR file. The name can be thought … Read more

Building a self-executable JAR with Gradle and Kotlin

Add the plugin application, then set the mainClassName as mainClassName=”[your_namespace].[your_arctifact]Kt” For instance, suppose you have placed the following code in a file named main.kt: package net.mydomain.kotlinlearn import kotlin import java.util.ArrayList fun main(args: Array<String>) { println(“Hello!”) } your build.gradle should be: apply plugin: ‘kotlin’ apply plugin: ‘application’ mainClassName = “net.mydomain.kotlinlearn.MainKt” In fact Kotlin is building a … Read more

How do I create an executable fat JAR with Gradle with implementation dependencies?

You can use the following code. jar { manifest { attributes( ‘Main-Class’: ‘com.package.YourClass’ ) } from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } } Be sure to replace com.package.YourClass with the fully qualified class name containing static void main( String args[] ). This will pack the runtime dependencies. Check the docs if … Read more

What is an uber jar?

Über is the German word for above or over (it’s actually cognate with the English over). Hence, in this context, an uber-jar is an “over-jar”, one level up from a simple JAR (a), defined as one that contains both your package and all its dependencies in one single JAR file. The name can be thought … Read more

techhipbettruvabetnorabahisbahis forumu