title: How to Inject an external properties file in spring context
body: <p>My question is an exact duplicate of this question : 
  <a href="https://stackoverflow.com/q/8270290/1083581">Spring application context external properties?</a></p>
  
  <p>This is how I injected the props file before : </p>
  
  <pre><code>&lt;util:properties id="smrProps" location="classpath:/spring/SomeProps.properties" /&gt;  
  </code></pre>
  
  <p>But for the life of me, I cant figure out what to use in <code>location</code> when I want to inject a properties file which will be in the same directory as a runnable jar. I know where the classpath points and my props is just one level up, so I even tried <code>classpath:/../SomeProps.properties</code> assuming it will look in the parent folder, but no luck.</p>
  
  <p>For ex if jar is in : <code>C:\temp\some.jar</code>and properties file is in <code>C:\temp\SomeProps.properties</code> </p>
  
  <p>If some.jar is in temp, then SomeProps.properties will also be in temp. Of course, I cannot be using C:\temp\SomeProps.properties in location</p>
  
  <p>Can someone please guide me on how I could use this props file ?</p>