he Problem:
wanted to read a property file from the classpath.
he Solution:
property file called test.properties in the classpath.
URL url = ClassLoader.getSystemResource("test.properties"); Properties p = new Properties(); p.load(new FileInputStream(new File(url.getFile()))); System.out.println(p.getProperty("my.property"));