Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to pass configuration file to scala jar file

I am using the typesafe config library in my code and then I generate a jar file. The application works fine when I embed the reference.conf file inside the jar. But is it possible to provide the config file as a parameter to the jar ? for example

java -DmyconfigFile=/dir/dir/reference.conf -jar myjar package.class.myobject.
like image 876
CruncherBigData Avatar asked Jul 12 '13 20:07

CruncherBigData


1 Answers

Yes it is. See this thread on using an external akka config here.

java -Dconfig.file=/dir/dir/reference.conf -jar myjar package.class.myobject.
like image 65
Noah Avatar answered Sep 24 '22 04:09

Noah