How to access properties file present in the jar file in another project?
<p>I have a java class . In that class a condition is present. If that condition is true then i want to create a folder on local drive. For creating that folder i want to access properties file which is present in  a jar file. I already included that jar file in my current projects class path. For this i wrote the code like this:</p>

<pre><code>if(x == 1)
{
   InputStream stream= classFromjar.class.getClassLoader().getResourceAsStream("RestProperties.properties");
   BufferedReader br = new BufferedReader(new InputStreamReader(stream));
   String line;
   while ((line = br.readLine()) != null) 
    {
        prop.setProperty(line.substring(0, line.indexOf("=")), line.substring(line.indexOf("=") + 1));
    } 
    br.close();
}
</code></pre>

<p>But I get null InputStream. How to access the properties file. Please help.</p>
