title: Reading properties file outside jar
body: <p>I have my jar file and properties file in same location (C:\test). When I run the jar through script, it throws FileNotFound exception for the properties file. This runs perfectly through RAD. What am I doing wrong here. I tried other ways, like getting the path of the jar file, etc, but no luck there too.</p>
  
  <p>Script: </p>
  
  <pre><code>@echo off
  REM Eventually change directory to the program directory 
  cd C:\test\
  REM run the program
  "C:\Program Files (x86)\Java\jre6\bin\java.exe" -jar  "C:\test\test.jar"
  </code></pre>
  
  <p>Code to read properties file: </p>
  
  <pre><code>    private void loadProperties() throws IOException{
  
      appProperties = new Properties();
      InputStream in = new FileInputStream("./EDMSWS.properties");
      appProperties.load(in);
      in.close();
  }
  </code></pre>
  
  <p>Manifest File: </p>
  
  <pre><code>Manifest-Version: 1.0
  Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader
  Rsrc-Class-Path: ./ commons-io-2.4.jar JSQLConnect.jar poi-3.11-201412
  21.jar
  Class-Path: .
  Rsrc-Main-Class: com.example.xxx.xxxxx
  </code></pre>