You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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: _*)
}
The text was updated successfully, but these errors were encountered:
I think the problem is in com.sfxcode.sapphire.data.Configuration
val config: Config = ConfigFactory.load()
This loads the conf even their is another one.
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
The text was updated successfully, but these errors were encountered: