There are probably some good reasons not to bundle a JRE. Taking a moment to ponder, I can think of at least the following:
- No automatic security updates
- Less portable
On to some reasons for bundling a JRE:
- Control over major Java version (1.4,1.5, 1.6) - this is less of an issue today, since 1.5 has reached its end-of-life and 1.4 is far behind that. Thank goodness for that.
- Control over the exact version (i.e. 1.6 Update 20) - to ensure mandatory functionality works properly
- So the end users don't need to install something additional
- So your program is not influenced by the system environment
- So your program does not influence other applications in the environment
- Less variables for when customers report bugs
- No automatic updates - which could break functionality
- Less to test
For instance, in the 1.5 days, I recall one release that had very misbehaved tabbing through components in a UI. In the era of Windows 7 - you need a minimum of 1.6.0 Update 18 - or you have missing icons in Open/Save File Dialogs. It is not acceptable to have a UI defect like that in a shipping app - any less, and you don't have full Windows 7 support. Except on 64-bit systems Update 18 has a bad habit of crashing the JVM a lot...so you need a more recent update. Then there's the Swing/AWT changes in Update 12 that alter behavior. Then I'm pretty sure depending on the version, applets load differently, if that's a factor (in one of our cases, integration with another process - it is).
You can avoid all that by picking a version you know works for your required situations. This means less to QA. Less potential headaches. The trade-off is losing faster security updates, increased application size (which believe it or not - still matters even in the age of 3TB hard drives), and portability. If you are in a Windows-only market, as I have seen several applications be, then portability isn't affected. Even if there are other target platforms - it's just a matter of repackaging for other platforms.
I believe there are some good reasons to bundle a JRE - on Windows, anyway.