简体   繁体   中英

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>

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

If the installers simply do the effect of adding natives to the run-time class-path, then the ExtensionInstallerService will not be required.

In that case, just add the natives themselves to the root of a Jar file for each OS and add references to those Jars into the resources section (suitably partitioned for each OS) as nativelib elements.


@finnw BTW: Nice link to the EIS demo. I might be biased though - I wrote it. ;)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM