Bundling JRE Windows/Linux/Mac

Hello,
What is the best way to bundle a JRE with my application? I only have a windows computer at home so it is hard for me to test this. I have no idea even how to get the linux and mac JREs and then extract them onto my computer, so that I can put the jre folder inside my game directory.

Can someone help me out?
Thanks,
roland

I’ve only ever done Windows myself but I need to switch to embedded VMs for both Mac and Linux as well. All ears here :slight_smile:

Cas :slight_smile:

While we are waiting for someone to give us an answer :wink:

So at the moment if you are on linux or mac you need to install java yourself before playing the game? do you have any estimate how much this decreased the likelyness of the average user wanting to try out one of your games?

Also, if not bundling the JRE they need to add java as an environment variable :frowning:

for Linux, last time I checked when you visit the Oracle page and download the jre manually, its just an archive which you extract and then there is a makefile or whatever which “installs” it
you then have the jre at the location you specified, and just like with windows its just a folder which you can just package with the game - using a .sh file to call it or something more sophisticated

so Im sure mac would be similar, just with the App Builder things afterwards

For windows btw I do the same as explained for linux, copy jre folder, make sure you have the server jvm, have .bat file which starts everything, then grab a bat to exe converter which also hides the console, has icons and everything and you’re good to go

and then most people use NullSoft Install Script to make installers for windows…
on linux well, not sure what is best… well the BEST way would be to have installers for many different distros ;D
and mac should be done with the aforementioned APPBuilder or whatever its called

On Linux, in the .deb packages, we specify a dependency on OpenJDK, which seems to take care of it for us. Not sure if the Oracle one even works. I have no idea whether it really works or not successfully, based on the general lack of feedback. People do buy the games for Linux though which would imply that it’s working to some extent.

On the Mac we’ve hitherto relied on the system JVM but with the move to OpenJDK 7 we’re in for a rough ride.

Cas :slight_smile: