Search code examples
install4j

Set VM Option if it isn't empty


In my install4j installer I set VM option from installer variable:

${installer:proxyHostVM}

Can I do it only if variable available and isn't empty ?


Solution

  • You have to set the "Condition expression" property of the "Add VM options" action that you use to set this VM parameter:

    String value = (String)context.getVariable("proxyHostVM");
    return value != null && !((String)value).isEmpty()