jr is a small native launcher for Java apps on Windows and macOS. Your jar gets its own exe or Mac app with your name and icon. It finds Java, or downloads it, starts faster from the second run, and updates itself.
curl.exe -fLo jr.exe https://github.com/jarrunner/jr/releases/latest/download/jr.exe .\jr.exe myapp.jar
curl -fsSL https://github.com/jarrunner/jr/releases/latest/download/install.sh | sh jr myapp.jar
Your app stays an ordinary jar. jr makes running it feel like running any other program.
Your app gets an exe (or a macOS app) with its own icon and version. It can run the JVM inside that process, so Task Manager shows myapp.exe, not another java.exe.
jr uses an installed Java that fits your app. If there is none, it asks, then downloads Eclipse Temurin into the same cache jbang uses, checked against its SHA-256.
On Java 25 and newer, jr keeps an AOT cache for each jar and rebuilds it when the jar changes. Nothing to configure.
About 600 KB, with no runtime bundled and nothing for your users to install first. It picks the right console by itself: none when double-clicked, the terminal when run from one.
Add jr-maven-plugin to your build. Every mvn package, on your machine or in CI, then builds the launcher.
myapp -Xjr:update replaces the app with its next version, even while it runs..app.<plugin>
<groupId>io.github.jarrunner</groupId>
<artifactId>jr-maven-plugin</artifactId>
<version>1.3.0</version>
<executions>
<execution>
<goals><goal>exe</goal></goals>
</execution>
</executions>
<configuration>
<icon>${project.basedir}/app.ico</icon>
<javaVersion>25+</javaVersion>
</configuration>
</plugin>
mvn package → target/jr/myapp.exe
All open source, under the Apache License 2.0.
mvn package.install and update commands, with no installer.--help.jr is written in Java and compiled to a native program through TeaVM's C backend. These are the tools that make that work.
hello is a tiny app built with jr-maven-plugin. Its exe updates itself from this site: run hello-windows-x86_64.exe -Xjr:update-check on 1.0.0 and it finds 1.1.0.
Its source is in jr-maven-plugin/examples/hello.