Pregunta

Is it possible to use a variable for the port in the "Wait for http port" Action?

¿Fue útil?

Solución

As of install4j 5.1.x, this is not possible. You change it with a code snippet, though. Add a "Run script" action with the script

import com.install4j.runtime.beans.actions.control.*;

int port = (Integer)context.getVariable("myPort");
((WaitForHttpPortAction)context.getActionById("123")).setPort(port);

return true;

This assumes that you have saved an integer port value to the installer variable "myPort". You have to replace "123" with the actual ID of the "Wait for http port" action.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top