Method1: in = this.getClass().getResourceAsStream(fileName); props = new Properties(); props.load(in); Method2: props.load(Thread.currentThread(). getContextClassLoader(). getResourceAsStream(fileName)); both the methods are returning NULLPointerException. Iam not able to locate the properties file usignthe above syntax. any other solution ? pls help asap. thanks.