Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

What is the recommended practice for bundling JRE with Java Application?

843798Nov 20 2008 — edited Nov 21 2008
Hello,

I am using a software called Advanced Installer to create a Windows installer (.msi file).
This .msi file contains :

- a .exe file which is a wrapper for a .jar file (a Java Swing program),
- and a directory for the JRE.

I read an article on the web which recommended bundling the JRE with the Java program. And
this is what I am doing. And my understanding is that if the user's system does not already
have the JRE installed, the bundled JRE would allow my Java Swing program to run.

However, when I tried to install my .msi file on a system that did not already have the JRE,
my Java Swing program would not start. After installing the JRE on this system, my Java
Swing program started and ran fine.

Do I really need both JREs, one bundled with my Java Swing application and one installed at the
system's location for my Java Swing program to start and run?

Another question I have is that if every application would bundle its own JRE, there could be many
copies/possibly versions of the JRE on the system, is this acceptable? What is the common or
recommended practice?

Thank you for your help.

Akino.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 19 2008
Added on Nov 20 2008
2 comments
554 views