Validate existence of JRE, if not present show a message and redirect to a URL

Answered

Comments

1 comment

  • Avatar
    IDF

    Figured out the solution by myself. Below is the xml..

    <preInstallationActionList>
        <!-- Set abortOnError="0" and showMessageOnError="0" so the action does not report any error if Java is not detected -->
        <autodetectJava selectionOrder="newest" promptUser="0" abortOnError="0" showMessageOnError="1">
            <validVersionList>
               <validVersion>
                 <vendor>sun</vendor>
                 <minVersion>1.5</minVersion>
                 <maxVersion>1.8</maxVersion>
               </validVersion>
            </validVersionList>
        </autodetectJava>   
            <actionGroup>
                <actionList>
                    <showInfo>
                    <text>The installer will re-direct you to the website to install Java(tm). After installing Java(tm), please install the software.</text>
                </showInfo>
                <launchBrowser>
                    <url>www.example.com/download/jre/download.jsp</url>
                </launchBrowser>
                <exit/>
            </actionList>
            <ruleList>
                <isFalse value="${java_autodetected}"/>
            </ruleList>
        </actionGroup>
    </preInstallationActionList>
    
    0
    Comment actions Permalink

Please sign in to leave a comment.