Back to:
www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html.
ClassLoader loader = ClassLoader.getSystemClassLoader();
System.out.println(loader.getClass().getName());
InputStream in = null;
if (loader != null) {
URL url = ClassLoader.getSystemResource("com/comp/resource/workflow.properties");
String path = System.getProperty("catalina.home") + File.separator+ "workflow.properties";
System.out.println("Path"+path);
if (url == null) {
in = loader.getResourceAsStream("com/comp/resource/workflow.properties");
if (in != null) {
props = new Properties();
props.load(in);
System.out.println("property val :" + props.getProperty("PushAppImpl"));
}
}
if (url != null) {
in = url.openStream();
System.out.println("property val :" + props.getProperty("PushAppImpl"));
} else {
System.out.println("STILL NULL");
}
NO matter what it gives Back Null
the jat filwe is in the LIB directory why is it not able to locate the propertiers file?