/java-jar-version

Demo code to go along with a blog post about determining jar versions at runtime

Primary LanguageKotlinApache License 2.0Apache-2.0

Java Jar Self-Version Demo

This repo shows how to determine the vendor, application name, and version of a jar at runtime.

To read more about this, check out the post I wrote on my blog.

To build:

$ ./gradlew clean jar

To run the java version:

$  java -jar build/libs/self-version-demo-1.0.0-SNAPSHOT.jar

To run the kotlin version, add a command line argument:

$  java -jar build/libs/self-version-demo-1.0.0-SNAPSHOT.jar kotlin