You can use one of the following two statements depending on the context from which you want to read the resource file:
[className].class.getClassLoader().getResourceAsStream
("filename"); //to call from a static context
this.getClass().getResourceAsStream("filename"); //to call from a non-static context
No comments:
Post a Comment