The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

Bundle the JRE with the program.

Hi there!!

Is this possible to bundle the JRE right into the program that you create? And if yes, so how to do that? It may be very helpful for people that don't know how to download the JRE and how to install and configure it on their computer.*

Re: Bundle the JRE with the program.

If you only care about Windows, you can bundle it using a Windows binary executable wrapper. I use JSmooth.

If you're looking to maintain platform independence, no. You could provide the installers in separate download versions, but assuming they don't have Java (which would be very strange), your program would never be able to run, so they user would be on their own for installing it.

You either need to use an EXE wrapper (or installer) like I suggested above, or write native code to handle it.

Java is fairly well established, though, so you really shouldn't have to worry about it. Macs have it built in and most Windows users either have it pre-installed by the manufacturer or will install it within 24 hours of buying the computer when they realize half of the internet isn't working.