1
votes

I tried googling it, but couldn't find an answer:

We need to ship zip file containing an executable jar file (which is a small swing program that we wrote) to clients. We're not using any installer kit, simply packaging the executable jar and prop file in a zip file, which client will extract at a pre-defined location. Clients will deploy it on their machine at a given location. The program was built and tested on Java 1.8. We don't know if clients have the JRE already installed on their machine or even the capability to install it by themselves.

My question is: Can we also include the jre folder structure (from our machines where it was deployed using Java exe) in our zipped software, so it gets unpackaged on client machine and client can use this jre instead of learning how to install a new one? (My understanding, they might still need to add the JAVA_HOME to their windows classpath)

1
You can, but the 1.7.0_13 jre (for instance, I don't have Java 8 here at work) is 139MB. That may be a bit bigger than you really want to ship as part of your installer. Also, you'll need to update their PATH as well as CLASSPATH.azurefrog
Also, you'd have to check the license of the JRE if you are allowed to redistribute it. See this info from Oracle's readme.Jesper
Also, they'd then have a "rogue" version of Java on their box which isn't being managed via the control panel like you'd think. This could cause issues when troubleshooting other applications on their computer. I'd look into trying to automate a normal Java 8 installation onto your clients' boxes if you're worried they can't do it themselves.azurefrog
Some more info: the JRE 8 README explains that you may redistribute it and which files are required and which are optional. (You must also follow Oracle's Java SE Runtime Environment Binary Code License agreement)Jesper
@azurefrog The Java 8 JRE is much smaller than 139MB; depending on the platform between 35 - 60 MB (which is still not really small...).Jesper

1 Answers

0
votes

Oracle's JRE 8 README explains that you can redistribute (parts of) the JRE and explains which parts are required and which are optional.

When you intend to do this, be sure to check the license agreement:

Vendors must follow the terms of the Java SE Runtime Environment Binary Code License agreement.