github linkedin
Main-Class Manifest Entry With Gradle
2015-10-07

Use Gradle? Want to add the Main-Class attribute to your manifest in a JAR file? Here you go:

mainClassName = 'foo.bar.Program'

jar {
    manifest {
        attributes 'Main-Class': mainClassName
    }
}

Tags: java

Back to posts