private static final String strDeleteAddress = "DELETE FROM APP.ADDRESS " + "WHERE ID = ?";
This is the full code for a class I retrived off the internet. Somehow I got the program working by complete accident but then when I changed something it kicked out the same NPE. I could get it working again as it keeps popping up with a NullPointerException on the line where my properties are assigned:dbProperties.load(dbPropInputStream);. I tried to restart from the beginning as thats how I got it working this morning but to no avail. My confirguration.properties file is in the same directory as the class. I know that it works because I actually got the entire program to run through. I tried debugging but I keep coming unstuck because I can't see where I'm going wrong. The error is occurs when in the loadDBProperties method because the dbPropInputStream does not obtain the information form the properties file.
As for setting the class path I think that the program is setting the classpath with this code:
The following information is in the properties file:
I'd like to get this working as its my first attempts at getting any database connection in java and I can see that by using this class I could tweak it to fit into any other future application.