jre mandatory installation - Advanced Installer Community

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!

Adrian Mojoatca
Posts: 8
Joined: Wed Jan 16, 2013 2:30 pm

jre mandatory installation

Hello,

I'm trying to make an installation kit for a java application.
I want that the users will have ALWAYS to install the Java Virtual Machine (jre) when they run the kit (because sometimes the jre can be corrupted - it happened).
So every time they are running the installation kit they have to be prompted to install JVM(JRE) from the internet.
I've made an *.aip file:
- in ProductDetails - set the name, vers, company
- in Prerequisites - at Pre-install - PROPERTIES: Java Runtime Environment - min. vers. 1.7.0, options unchecked(all), comprerssion unchecked (all), registration unchecked (all)
- INSTALL CONDITIONS: Always install prerequisite, and all supported Windows conditions set
- in Files and Folders - only my SINGLE jar added in Application Folder.
- in Media - Single MSI (resources inside) checked

But, with the resulted kit, when installing the application there is no request for java runtime environment installation, either it is or not present on that machine, or even it is.
Thanks in advance.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: jre mandatory installation

Hi,

Pleas keep in mind that when you add a prerequisite in the "Pre-install" folder the package type is automatically changed to EXE because the prerequisite must be installed before the launch of the MSI package (which is contained inside the EXE package).

If you want to have an MSI package, you can add your prerequisite in the "Feature-based" folder and use one of the "Use file from disk" or "Download single file from URL" options from the "Setup Files" tab of your prerequisite.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Adrian Mojoatca
Posts: 8
Joined: Wed Jan 16, 2013 2:30 pm

Re: jre mandatory installation

Hello,
Please let me know about the following:
- I ndeed an installation kit (.exe or .msi, doesn't matter) based on some jar files
- I need the user to be promted when installing to install also the jre if the local jre is an older version (let's say lower than 1.6)
- I need also when the user tries to reinstall the application (re-runs the installation kit) to be promted to "Modify", "Uninstall"or "Repair",and NOT ot Uninstall the application from Control Panel first.
What do you suggest me in this case? (exe, msi, which settings, etc)
Thank you,
Adrian
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: jre mandatory installation

Hi Adrian,
I need the user to be promted when installing to install also the jre if the local jre is an older version (let's say lower than 1.6)
In order to achieve this you can simply add the "Java Runtime Environment" predefined prerequisite in the "Pre-install" folder which is already set to be installed if the local version is lower than 1.6 (in Advanced Installer 9.0 and above).
I need also when the user tries to reinstall the application (re-runs the installation kit) to be promted to "Modify", "Uninstall"or "Repair",and NOT ot Uninstall the application from Control Panel first.
It will always happen if the "Register product with Windows Installer" option is checked in the Product Details page.
What do you suggest me in this case? (exe, msi, which settings, etc)
Because of the pre-install prerequisite you must choose an EXE package type.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Adrian Mojoatca
Posts: 8
Joined: Wed Jan 16, 2013 2:30 pm

Re: jre mandatory installation

Hello,

I have another question about jre installation:
- I need an installation for a certain jar
- I need the installer to check if a certain version of jre (6 in my case) is already intsalled on that pc
- If that particullar version is not installed, I need the installer to install the jre (NOT promting to an internet page, but from the installer itself)
- so I suppose the jre should be included in the installer somehow
Can you suggest me the best solution (an exe, with jre in the prerequisites, or else) and the proper steps to follow?
Thank you.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: jre mandatory installation

Hi,

In order to achieve what you want you can follow the steps below:
- download the full JRE6 package
- go in the Prerequisite page, use the [Package Prerequisite] toolbar button and add the JRE6 as a prerequisite
- go in the "Install Conditions" tab of the JRE6 prerequisite and select the "Install prerequisite based on conditions" option
- use the [New] button and add a criteria with the following configurations:
  • Criteria: Registry SubKey Enumeration
    Registry Key: HKLM\SOFTWARE\JavaSoft\Java Runtime Environment
    Minimum: 1.6.0
    (1.6.0 is the version string for JRE6)
- remove the default criteria (i.e. File Version: [SystemFolder]file.dll)
- build and run the project

Let us know if this helped.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Adrian Mojoatca
Posts: 8
Joined: Wed Jan 16, 2013 2:30 pm

Re: jre mandatory installation

Hello,
I've solved the problem by:
- at prerequisites -> setup files I've checked "use files from disk"
- include jre-6u34-windows-i586.exe as main setup file for x86 systems and jre-6u34-windows-x64.exe for x64 systems
- it works now
I still need and advice:
- I need a SINGLE installer (for both x86 and x64)
- on oracle site I found only separate installers for jre1.6 (one for x86, one for x64)
- do you have any suggestion about how can I make a single installer for both systems? (if at Install Conditions I uncheck the "use 64-bit locations when evaluating conditions on a 64-bit machine" could it work?).
Thank you,
Adrian
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: jre mandatory installation

Hi Adrian,

To achieve this you can add both JRE6 installers as prerequisites (x86 and x64), then go in the "Install Conditions" tab and from the "Supported Windows Versions" list choose "32-bit Windows Versions" for JRE6 x86 and "64-bit Windows Versions" for JRE6 x64.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Adrian Mojoatca
Posts: 8
Joined: Wed Jan 16, 2013 2:30 pm

Re: jre mandatory installation

Hello,
I have a question about placing a jar in MAC OS Startup:
- for windows I've managed to place the jar in the startup (Files and Folders -> Start Menu -> StartUp) so that the applications automatically starts at booting the system
- now I need the same thing for MAC OS (the jar should start at booting)
- I do have a developer signature for mac developper (a .cer file)
Please let me know if this can be done using Advanced Installer (I've saw that anything placed in Files and Folders -> Start Menu -> StartUp is available only for Windows Installer.
Thank you,
Adrian
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: jre mandatory installation

Hi,

Unfortunately, we don't have predefined support for this, our MAC OS support is quite limited.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”