AF
HomeTagSubmit NotesAsk AnythingLoginSubscribe Us
AF
1. Feel Free to ask and submit anything on Anyforum.in and get satisfactory answer
2. Registration is not compulsory, you can directly login via google or facebook
3. Our Experts are looking for yours ?.



java-basics: Embedded JRE

i have downloaded jre 8(jre-8u121-windows-i586.tar) as a tar.archive.
can i use embed it in my application by using setup building tools like inno setup?

java x 211
basics x 171
Posted On : 2017-04-15 09:25:34.0
profile rahul patil - anyforum.in rahul patil
42-30
up-rate
7
down-rate

Answers


Oracle have provided a tool for packing up Java installations and they strongly recommend providing a jre as part of your installation. The advantage of this is that the customer will not have to install an additional package in order to run your application, and you can test your application against the correct Java run time for you and ensure there are no incompatibilities before shipping. The disadvantage is that building the installer is slightly more complex and your download size is larger.

Of course building installers get more complex if you want to provide your applications for Windows, Linux ectera and it would be alot simpler to just provide an executable jar but this is not the experience customers want. Customers do not expect to be able to download one application and run the same exe on windows, osx and linux. They are happy
to have different installers for each platform and also expect the installers to work in a different way.

This is how to do it:

Windows:Use Izpack with bundled jre wrapped with launch4j so installer can be run as an exe.

Linux:Use Izpack without bundled jre, as user linux users like to be in control of exactly what on their machine, but specify minimum version of Java allowed. Ideally I should create packages for the main Linux Package Managers such as rpm but Ive decided this is not worth the effort at the moment as Linux users are a small percentage of my client base.

Most of the installation is automated using Maven and Ant, so its not a big effort to build these different installers.

Posted On : 2017-04-16 23:46:27
Satisfied : 1 Yes  0 No
profile Garima Gupta - anyforum.in Garima Gupta
596129558962
Reply This Thread
up-rate
10
down-rate



Post Answer
Please Login First to Post Answer: Login login with facebook - anyforum.in