Java Application with 2 main methods - 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!

Charles128
Posts: 1
Joined: Thu Jul 31, 2008 1:50 pm

Java Application with 2 main methods

I am releasing a Java application which has 2 main methods. Two Windows OS processes are intended, one containing a GUI which reads and writes into a database, and one which is invoked from the startup group, reads the database, and takes various actions. The GUI part of the application is not always executing, while the startup group process is executing whenever the computer host is up and running. I've had no trouble at all creating 2 msi files which are to be invoked one after the other in order to install this application. On the Java Products screen, there is only room for a single main method, so it seems that it would be necessary to create 2 msi files, as I have done. What would be the best strategy for chaining these 2 installations together, and does the Advanced Installer facilitate this in any way? Would it be better strategy to create a third application whose only job would be to invoke the 2 msi files?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Java Application with 2 main methods

Hi,

The first MSI can be added as a prerequisite for the second one. Note that the User Guide contains a prerequisite tutorial which may help you.

However, you can also create two Java Products in the same package instead of creating two packages. The first Java Product can be configured for the first class and the second Java Product can be configured for the second class.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”