How to transfer configuration file to scala jar file

I use the typafe config library in my code and then create a jar file. The application works fine when I paste the reference.conf file into the jar. But is it possible to provide the configuration file as a parameter to the bank? eg

java -DmyconfigFile=/dir/dir/reference.conf -jar myjar package.class.myobject. 
+7
scala configuration typesafe
source share
1 answer

Yes it is. See this topic when using the akka external configurator here .

 java -Dconfig.file=/dir/dir/reference.conf -jar myjar package.class.myobject. 
+10
source share

All Articles