We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

geeta
Posts: 9
Joined: Wed Nov 19, 2014 10:54 am

Dynamic JRE bundling(prerequisites)

Hello Support team,

I want to add dynamic JRE bundling functionality in my project , but i am facing difficulties in that.

I have created the installer in that i added prerequisite for JRE and given url path to download that jre.
But the problem is that when i tried to install my application's installer on a machine which has JRE installed already, the application sense that JRE not found and gives popup having url to download that JRE.
I have explored your document , I did everything as per the documentation but it fails to work. Please help me out as soon as possible. :roll:

Please do needful. Your help will be really appreciated.

Thanks,
Geeta
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Dynamic JRE bundling(prerequisites)

Hello Geeta and welcome to Advanced Installer forums,

Please note that a prerequisite will be installed based its install conditions defined in the Prerequisite Install Conditions Tab of the related Prerequisite. The Install Conditions section allows you to condition the prerequisite based on custom searches. You can create multiple searches for the same prerequisite. In order to test a condition you can use the [Test] button.
The Prerequisite Search Dialog allows you to add a new search to the installation conditions of a prerequisite or edit an existing one.

Also, be aware by the two options below the “Install Conditions” pane:
  • Install only if at least one condition is false - If this option is selected, at least one search must fail in order to install the prerequisite.
    Install only if all conditions are false - If this option is selected, all searches must fail in order to install the prerequisite.
So, the prerequisite software will be installed according to the enabled option which refers to the install condition that you have defined before.

However, all the predefined prerequisites from our list have their install conditions defined. So, can you please add the JRE prerequisite from our predefined list from the Prerequisites page and delete the existion one and see if the behavior still persist? If it does, please attach your .AIP(project file) to the forum thread so we can further investigate this.

Please let us know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
geeta
Posts: 9
Joined: Wed Nov 19, 2014 10:54 am

Re: Dynamic JRE bundling(prerequisites)

Hi Dan,

Thanks for your reply. But it doesn't work. Installer directly starts main application's installation process.

Here i am attaching my SOArite.aip file

I want msi installer also. And if JRE is not available on user's machine it should allow user to download and install JRE and then my main application should get installed.

Please do the needful. Eagerly waiting for your reply.
Attachments
SOArite.aip
(31.56 KiB) Downloaded 380 times
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Dynamic JRE bundling(prerequisites)

Hi Geeta,

The JRE and JDK prerequisite are of Open URL prerequisites, this is why they are added by default as Pre-Install prerequisites.

Please note that in order to the download the JRE from the oracle download page, a step must be done accept their license agreement.
This is why the prerequisite is not installing. The download link for downloading the prerequisite is just a page where the version can be selected by the user, so it is not a valid link for automatically download.

So, if you want to add the JRE as a feature based URL Prerequisite, you need to provide a valid download URL, but not the one from Oracle as their License Agreement must be accepted before downloading any JRE version.

Since you want to have the installation package as a .MSI, you need to add the JRE as a feature based prerequisite. You can use the following approaches:
- download the JRE from Oracle and use the Add prerequisite toolbar button to create a new prerequisite using files from disk. Please keep in mind that this type of prerequisite is created with default settings, so you need to configure it manually.
- host yourself the JRE and provide a valid download link

Please let me know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
geeta
Posts: 9
Joined: Wed Nov 19, 2014 10:54 am

Re: Dynamic JRE bundling(prerequisites)

Hey hi Dan,

Thank you very much for your reply , it helps me to come out of my issue. Thank you so much.

Now i am facing another issue as described below,
At first i have no JRE and my application on my machine, in this scenario, installer senses the situation and download and install prerequisite first and then the my application . Here i make installer by using JRE 7. It works just fantastic.

Now again i removed JRE 7 from my machine and installed JRE 8, and i tried to run my installed application , and it gives me below error popup and prevent me to open the app .

Can you please tell me what i should i do ?
Attachments
Capture.PNG
Capture.PNG (54.56 KiB) Viewed 8050 times
geeta
Posts: 9
Joined: Wed Nov 19, 2014 10:54 am

Re: Dynamic JRE bundling(prerequisites)

:| :| waiting for reply...
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Dynamic JRE bundling(prerequisites)

Hi Geeta,

Does the related file exist in the related path?

Code: Select all

C:\Program Files\Java\jre1.8.0_25\bin\server\jvm.dll
If does not exist, that is why you get that error. Also, this may occurs on a 64-bit machine where you have installed a 32-bit version of the jre.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
geeta
Posts: 9
Joined: Wed Nov 19, 2014 10:54 am

Re: Dynamic JRE bundling(prerequisites)

Yes you are correct Dan. Thanks. :P

I have 64 bit machine and i have installed 64 bit version of JRE but my installer was 32 bit .
Now i made 32/64 bit installer now it works fine.

Now i have observed that even if JRE is uninstall still my application runs means its getting JRE somewhere.
But when i command "java" to command prompt then its not recognizing it, Why it happens ?
Can you please guide me immediately ?
geeta
Posts: 9
Joined: Wed Nov 19, 2014 10:54 am

Re: Dynamic JRE bundling(prerequisites)

waiting for your reply ...
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Dynamic JRE bundling(prerequisites)

Hi Geeta,

I've tested your scenario but I cannot replicate it. Once the JRE was uninstalled, my Java app was not working anymore.
Can you please try to test on multiple clean machines and see if the behavior still persist?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
geeta
Posts: 9
Joined: Wed Nov 19, 2014 10:54 am

Re: Dynamic JRE bundling(prerequisites)

Hi Dan,

Thanks for your reply .

I will test it on few clean machines.

Return to “Building Installers”