Invoke java program with bundled JRE during the 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!

xjluogang
Posts: 20
Joined: Sun Apr 14, 2013 3:24 pm

Invoke java program with bundled JRE during the installation

Hello,
I'm new for advanced installer, and I have a few questions with the it.
I'm create a installer with the JRE bundled. I assume that the target machine doesn't have any JDK/JRE installed, how can I run a java program to do something during the installation?
For example, This installer is JRE bundled, when user click "Next" button in welcome dialog, I want to run "verify.jar" to do something. If my java code return error, the welcome dialog will show some warning message and user cannot continue to install. Since the target machine doesn't have JRE installed, I have to use bundled JRE to execute my java pragram. The problem is that the bundled JRE doesn't installed yet during that time (we're only showed welcome dialog).
How can I do that? Can everyone give me an simple project? Thanks a lot!
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Invoke java program with bundled JRE during the installa

Hi and welcome to our forums,

You could add the JRE installer as a pre-install prerequisite, so it installs before the main application is launched. This means you would have an EXE as output file, not an MSI.

Also, running java as a custom action is quite complicated, we recommend C++ or DTF custom actions.

Best regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
xjluogang
Posts: 20
Joined: Sun Apr 14, 2013 3:24 pm

Re: Invoke java program with bundled JRE during the installa

I see... maybe VBScript is more easy way to do that...
Thanks anyway. :)

Return to “Common Problems”