2015 state of the art of packaging a java game with private JRE

Hello everybody,

recently I picked up my old Java game project (Dark Mines) and I decided that the best next step was to get some feedback on what it currently is, before adding more features. So I set out to create a release of it. I had a short experiment with Excelsior JET compilation which worked, but made for a very cumbersome release process and not a very small end result. In the end I used JSmooth and bundled a private JRE which is a manually stripped Oracle Java 8 JRE. The result is not too shabby (30MB zipped, 87MB unzipped).

Then I came across this forum, and searched for any suggestions on packaging the game. The newest entry I could find is from 2012 which basically describes the same as I have done, although with a smaller end result. Maybe because of the JRE version?

Anyway, I’d like to know if this is still the state of the art in distributing Java games, or that there is a better way.

Cheers!

I ship with OpenJDK JREs on Linux and Mac OS. It’s only reliable from OSX 10.7+ onwards; 10.6 can be flaky and anything earlier won’t work at all. Currently still using Java 7 but I’ll be moving to Java 8 once I get binaries.

Windows is a complete private JRE and I use my own C++ launcher for it. I could probably use someone else’s tool like JSmooth but as I’ve got it all worked out already in C++ I’ve never felt the need.

Installation on Windows is handled by NSIS with LZMA compression. Linux and MacOS use LZMA decompression on first run to decompress the JRE which shaves a few megs.

Cas :slight_smile:

princec is probably the most professional among us, so his answer is probably what you’re looking for.

But at the risk of summoning the JGO demons, there are several other options: you might want to look into JWrapper, or Launch4J. Doing a search on the forum for either of those will give you a ton of discussions where we debate this exact topic.

If you use something like libGDX, you can also deploy as JavaScript, which is probably the best option, imho.

Allright, thx for the quick response!