Search This Blog

Monday, January 18, 2010

How to get ClassLoader or Resource in a java static method?

Follow the below steps to load property file in a java static method.

Properties prop = new Properties();

prop.load(YourClassName.class.getResourceAsStream("File path"));

No comments:

Post a Comment