Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Every time someone installs an application with a separate, nested JRE bundle, James Gosling weeps. Write once, run anywhere indeed. –  jscott Apr 25 '11 at 14:07
    
WORA didn't promise JRE (version) independence, it promised platform independence. Otherwise Java would have to freeze at 1.0 –  Tahir Akhtar Apr 25 '11 at 14:31
add comment

2 Answers

up vote 2 down vote accepted

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.

share|improve this answer
add comment

I see there are two options:

  1. Silent install It takes INSTALLDIR=<drive>:\<install_path> parameter
  2. Simply zip up an installed folder (see a discussion here)

I think for my purpose approach 2 is better because of it's simplicity. One would have been better if we had to show the Java configuration tool in windows Control Panel or use the browser integration for applets/jnlp

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.