-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Hello Tom
I encountered a problem. I have a default application.conf in my dev.
I have a argument for an dedicated conf file with the correct build date and number set up by my installer.
The conf is loaded and ready. After loading the conf I start the application. Buf sapphire always take the default conf.
How can I change this?
I can see the result in the
title. Because this is always (even conf loaded right) my dev title.
my main method
override def main(args: Array[String]): Unit = {
import scopt.OParser
val builder = OParser.builder[ApplicationParameters]
val parser1 = {
import builder._
OParser.sequence(
programName("Panakeia"),
head("panakeia cli","1.x.y"),
opt[java.io.File]('c',"config")
.required()
.action( (file,param) => param.copy(config = Some(file) ) )
.text("gives the config path")
)
}
OParser.parse(parser1,args,ApplicationParameters()) match {
case Some(r) if r.config.isDefined =>
ServerController(r.config.get)
case _ => //ServerController()
throw new RuntimeException("Configuration file not set!")
}
SFXApplicationEnvironment.setApplication(this)
javafx.application.Application.launch(classOf[SFXJavaApplication], args: _*)
}
Metadata
Metadata
Assignees
Labels
No labels