If your application is client-side, I would suggest both options: install with and without JRE. Many Java applications offer both installations. For example, a SmartGit application allows you to download an installation using a JRE or one that uses an existing JRE (where its users must have a compatible version of java). Many application servers have their own JDK, already included in the installation.
So, combining the deployment with your JRE is fine if you don't want any problems with your clients; however, I would allow installation without JRE (to satisfy picky :).
If your application is server-side, it usually does not come with a JRE, but again, this is not the rule.
In addition, your run / install script can verify that the JRE or JDK is installed correctly (if JAVA_HOME, etc. is installed), and then exit if there is no JRE. Moreover, the script can even load Java and install it locally - although it would be more practical to use only the bundled JRE that you prepared with the application. Or, if a JRE is detected, you can ask the user if they want to use existing Java or bundled.
JRE binding is not a big deal. Even sometimes, I install a Java application with JRE enabled because I turned on my system, for example. A new version or 64-bit version of Java that is not supported by the application, etc.
Hope this helps;)
source share