properties file is returning null
<p>i am trying to read values from properties file and
when i tried to run this program
its giving the output as<br>
      <code>null</code></p>

<pre><code>import java.io.FileInputStream;
import java.util.Properties;
public class JavaApplication1 {
final private static String osName = System.getProperty("os.name");
static final Properties configFile = new Properties() {

    {
        try {
            configFile.load(new FileInputStream("config.properties"));
        } catch (Exception e) {
        }
    }
};
private static String DIR = osName.equals("Linux") ? configFile.getProperty("tempDirForLinux") : configFile.getProperty("tempDirForWindows");
public static void main(String[] args) {
    System.out.println(DIR);
}
}
</code></pre>
