JavaFX application arguments injection in afterburner.fx
What you just have to do is to tell afterburner that program arguments are considered as a source of configuration, for that modify your main class as follow:
public void start(Stage stage) throws Exception {
// Use application parameters as additional configuration source
Injector.setConfigurationSource(getParameters().getNamed()::get);
...
}
Considering that your application uses a ServerConfiguration class managed by afterburner.fx (injected in some presenter for example) as the following
public class ServerConfiguration {When you launch your application using JavaFX parameters convention
@Inject
private String host;
@Inject
private String port;
...
}
java -jar myapp.jar --host=myserver --port=9090
then the ServerConfiguration object instance that will be created by afterburner.fx will have its fields injected with the program arguments values.