jarrunner

Run your Java app like a native program.

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.

Try it on Windows

curl.exe -fLo jr.exe https://github.com/jarrunner/jr/releases/latest/download/jr.exe
.\jr.exe myapp.jar

Try it on macOS

curl -fsSL https://github.com/jarrunner/jr/releases/latest/download/install.sh | sh
jr myapp.jar

Why jr

Your app stays an ordinary jar. jr makes running it feel like running any other program.

Its own exe, its own name

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.

Java is taken care of

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.

Faster from the second run

On Java 25 and newer, jr keeps an AOT cache for each jar and rebuilds it when the jar changes. Nothing to configure.

Small, and nothing to install

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.

Ship your own app

Add jr-maven-plugin to your build. Every mvn package, on your machine or in CI, then builds the launcher.

  1. Your settings (Java version, JVM options) are checked while the build runs and baked into the exe.
  2. A release exe can fetch its jar on first run and verify it.
  3. myapp -Xjr:update replaces the app with its next version, even while it runs.
  4. The same build also makes a macOS binary or .app.

Read the plugin tutorial

<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

The projects

All open source, under the Apache License 2.0.

For Java apps

How jr is built

jr is written in Java and compiled to a native program through TeaVM's C backend. These are the tools that make that work.

An example you can download

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.