Badlogicgames release Packr for packaging Java jar, assets and even runtime into a native executable

 

You know one of the things that suck about working in Java?

 

Java.

 

Or more precisely the Java runtime.  The need to have the Java runtime pre-installed in order to run your game is a bit of a pain.  Fortunately Badlogicgames, the people behind LibGDX have released Packr.

 

In their own words:

Packages your JAR, assets and a JVM for distribution on Windows (ZIP), Linux (ZIP) and Mac OS X (.app), adding a native executable file to make it appear like the app is a native app. Packr is most suitable for GUI applications.

 

To be honest, that explanation kinda sucks, their description on Reddit is much better.

This has been a pain point for a few of our users, though Minecraft made pretty much anyone on this planet install Java anyways 🙂

I wrote a little tool called packr which does the following:

  • bundle your jar/assets with an embedded JRE
  • add a native executable for the respective platform to make your app look native
  • minimize the JRE (zipped: 23mb, extracted 40mb)

This should make the user experience a bit better, as there aren’t any things the user needs to have installed before trying your game/app. All they need to do is download a ZIP/App Bundle and execute the native executable.

It’s very easy to use, either via CLI arguments, a JSON config file, or by invoking it directly from code (it’s really a library).

 

There are a couple limitations right now:

    • Icons aren’t set yet on any platform, need to do that manually.
    • Windows is 32-bit only, Linux is 64-bit only, Mac OS X is 64-bit only
    • JRE minimization is very conservative, depending on your app, you can carve out stuff from a JRE yourself, disable minimization and pass your custom JRE to packr

 

If this sounds useful to you, you can learn more at the Packr github page.

News


Scroll to Top