Search code examples
javainstallationjnlpizpack

How to install third party msi or exe or bin first and then when its done, start the main application?


Here is the problem, myapp.jar works and runs. But it has other native dependencies.

  • It has other third party libraries dependencies, which need to be installed first in windows and linux/mac depending on the user platform.

  • How the third_party_will_it_install_or_just_download_only.exe OR third_party_will_it_install_or_just_download_only.bin

Can be installed automatically ? They are themselves separate installations also.

>     <?xml version="1.0" encoding="utf-8"?>
>     <jnlp spec="1.0+" codebase="http://localhost:8080/" 
> href="advance.jnlp" >
>     
>     
>       <information>
>         <title>Test</title>
>         <vendor>Testing</vendor>
>         <homepage href="http://localhost:8080/"/>
>         <description>Demo</description>
>         <offline-allowed/>
>       </information>
>       
>     
>       <security>
>         <all-permissions/>
>       </security>
>       
>     
>       <resources>
>         <property name="jnlp.packEnabled" value="true"/>
>         <jar href="myapp.jar" />
>       </resources>
>     
>       <resources os="Windows" arch="x86"> 
>     
>         <j2se version="1.5+"/>
>     
>         <jar href="third___party___will_it_install_or_just_download_only.exe"/>
>     
>       </resources>
>     
>       <resources os="Linux" arch="i386">
>         <j2se version="1.5+"/>
>         <jar href="third___party___will_it_install_or_just_download_only.bin"/>
>       </resources>
>       
>       <application-desc main-class="web.Application" />
>       
>     </jnlp>

Solution

  • There's a demo here.

    Note: the entry point for the installer must be a .jar, so if you want to launch an .exe or .msi you must create another process from within the .jar