Having problems loading .properties file
<p>I have a common library project shared between a couple of different Android apps that I need to allow for development and production values to be available.  Using Ant I was hoping to be able to swap a environment.properties file for either a dev.properties or prod.properties file.</p>

<p>I am getting a NullPointer exception when trying to load the "/com/iis/..." properties file.</p>

<p>Any ideas to what is being done wrong?</p>

<p>** common is the project </p>

<pre><code>static {
    Properties p = new Properties();
    InputStream input = BaseWebApi.class.getClass().getResourceAsStream("/com/iis/common/environment.properties");
    try {
        p.load(input);
        input.close();
    } catch (IOException e) {
        Log.d(TAG, "Unable to load environment.properties file");
        e.printStackTrace();
    }

    sApiUserName = p.getProperty(KEY_API_USER_NAME);
    sApiPassword = p.getProperty(KEY_API_PASSWORD);
    sServerAddress = p.getProperty(KEY_SERVER_ADDRESS);
    sServerProtocol = p.getProperty(KEY_SERVER_PROTOCOL);
    sServerRootPath = p.getProperty(KEY_SERVER_ROOT_PATH);
    sServerPort = Integer.parseInt(p.getProperty(KEY_SERVER_PORT));
}
</code></pre>

<p>** not to much to see in the stacktrace</p>

<pre><code>09-09 12:35:43.935: ERROR/AndroidRuntime(853): Caused by: java.lang.NullPointerException
09-09 12:35:43.935: ERROR/AndroidRuntime(853):     at java.util.Properties.load(Properties.java:290)
09-09 12:35:43.935: ERROR/AndroidRuntime(853):     at com.iis.common.webapis.BaseWebApi.&lt;clinit&gt;(BaseWebApi.java:60)
09-09 12:35:43.935: ERROR/AndroidRuntime(853):     ... 8 more
</code></pre>

<p><em>*</em> I have tried every possible name combo that I can think of using the namespaces, folders and classnames</p>

<pre><code>// namespaces, folder
"/com/iis/android_common/environment.properties"
"com/iis/android_common/environment.properties"

// namespaces, project name
"/com/iis/common/environment.properties"
"com/iis/common/environment.properties"

// folder
"/android_common/environment.properties"

// project name
"/common/environment.properties"

// direct path
/environment.properties
environment.properties
</code></pre>
