title: How to get load file under resources folder in scala sbt
body: <p>I am having a akka actors config file under resources,</p>
  
  <pre><code>src/main/resources/remote_app.conf
  src/main/scala/actors/Notification.scala
  </code></pre>
  
  <p>I am loading the resources as below,</p>
  
  <p>1.</p>
  
  <pre><code>val configFile = getClass.getClassLoader.getResource("remote_app.conf").getFile
  val config_mediation = ConfigFactory.parseFile(new File(configFile))
  actorSystem = ActorSystem("MediationActorSystem", config_mediation)
  </code></pre>
  
  <p>2.</p>
  
  <pre><code>val path = getClass.getResource("/remote_app.conf").getFile
  val config_mediation = ConfigFactory.parseFile(new File(path))
  actorSystem = ActorSystem("MediationActorSystem", config_mediation)
  </code></pre>
  
  <p>Both works fine when i execute from main program and getting the below logs,</p>
  
  <blockquote>
    <p>[INFO] [11/21/2016 21:05:02.835] [main] [Remoting] Remoting started;
    listening on addresses
    :[akka.tcp://MediationActorSystem@127.0.0.1:7070] [INFO] [11/21/2016
    21:05:02.838] [main] [Remoting] Remoting now listens on addresses:
    [akka.tcp://MediationActorSystem@127.0.0.1:7070]</p>
  </blockquote>
  
  <p>I am creating a jar using sbt test:assembly and executing the main class as below
  SBT:</p>
  
  <pre><code>resourceDirectory in Compile := baseDirectory.value /"src/main/resources"
  resourceDirectory in Test := baseDirectory.value /"src/main/resources"
  
  java -cp &lt;jar&gt; &lt;args&gt;
  </code></pre>
  
  <p>Its not able to load the config file when i execute from jar.
  Anything am i doing wrong.</p>