Present parameters based on Java program output



  • Avatar

    You can just call the Java program and return the result as the stdout. Then, you can populate the options using the <addChoiceOptionsFromText> action:

       <programArguments>-jar ${installdir}/yourprogram.jar</programArguments>
    <!-- Process the stdout to get the appropriate format -->

    Please note that if you want to configure the choice parameter before the installation stage you will need to use an <unpackFile> action to unpack the jar file and the Java runtime (if you are not using the one from the system).

    You can find some more details in the below links:

    Run Program after Install and present Choices

    Populating Parameters at runtime

  • Avatar

    It is possible to run a Java JAR before installation is performed and based on its output or exit code perform certain actions - such as set whether parameter should be shown.

    Below is an example of finding Java, unpacking a JAR file, running it and setting if installdir parameter should be shown based on if exit code is 0:

        <programArguments>-jar "${system_temp_directory}/myjar.jar"</programArguments>

    It is also possible to populate choice parameter options using <addChoiceOptions> or <addChoiceOptionsFromText> actions.

    Based on what exactly you want to do, you can find additional information in our User Guide:

Please sign in to leave a comment.