Java – How install Sun JRE private to the application

installationjava

I need to ship a Java product with JRE included with it but I don't want the user to tackle the installation choices. My requirements are:

  1. JRE installation in a sub-folder of my application so that I can use relative paths in my .bat and .sh files.
  2. Installation should not mess with existing JREs on the system.
  3. Installation process should be as simple as possible.

Question: Can I simply unzip a JRE folder on to the client's machine without running the installer? If, no, what else can I do to keep the process as painless as possible?

Best Answer

I think if you are going to distribute it, you would want to make sure that you don't require an installer to be run otherwise you could overwrite defaults on the target workstation/ server. Then that client could get pretty upset!

If you include all the configuration files required to run your app with this self-contained jvm, you would be doing the same type of thing that other vendors do. So, I don't see this as a big issue. for example, don't require the enduser to set a JAVA_HOME systemwide and include any runtime options in a conf file like jboss does with run.conf or tomcat does with setenv.sh.

That being said, if you distribute the jvm, you're probably going to be responsible for supporting it, possibly well beyond the support periods that oracle provides--so you might want to consider that as a reason not to do it.

Related Topic