Packr – pack your libGDX app for Windows, Linux, Mac OS X

When you package your libGDX app for the desktop via Gradle r by exporting form your IDE, you usually end up with a JAR file which you can hand to your users. However, your users need to have a JVM installed.

Packr makes your libGDX app look more native. Packr does the following for you:

  • Bundle your JAR with a JRE, so your end users don’t need to install Java
  • Create a platform specific directory structure, e.g. App Bundle for Mac OS X etc.
  • Add a native executable that starts the embedded JRE, making your app look more native
  • Minimize the bundled JRE

You can pack for any platform on any platform, e.g. you can pack for Windows on a Mac and vice versa. You can configure packr in various ways, via CLI arguments, a json file per platform or directly from within your own code.

Check out packr on Github

13 thoughts on “Packr – pack your libGDX app for Windows, Linux, Mac OS X

  1. That’s very neat. Thank you for providing this. It’s the next best thing to having an AOT compiler for desktop platforms.

  2. Very cool to see progress in this dark corner of Java. I did some research two weeks ago what the current options are. One of the most promising options seemed to be the guys from infinitekind who created a fork of Oracle app bundler which offers advanced features, e.g. universal 32/64bit binary. If your two projects would merge and offer a Maven mojo (they are quite easy to write) – that would be awesome.

  3. What’s the average file size you guys are getting when you pack with packr? Are you satisfied with the result?

  4. I use my windows Computer to pack my jar to mac,and it can run normally,but when i pack my jar for windows it go wrongs,i am sad now….

  5. Sort of. If I pull out the unnecessary pits from the JVM, then of course the file size is smaller, but it is good enough for me. Getting a JVM size of 90MB, could probably get it down to 30MB if I did it my self 🙂

  6. Insanely easy to use, package to all platforms and the fact that is package the JVM. Couldn’t get Launch4j to do that.

Leave a Reply

Your email address will not be published.