I am trying access a properties file in a library. The problem is that the file is located in the META-INF folder of the application which is using my library. I am currently using:
private static final String CONFIG_FILE = "config.properties";
private Properties getConfigFile(){
InputStream input = null;
Properties config = new Properties();
input = this.getClass().getResourceAsStream(CONFIG_FILE);
if(input == null){
System.out.println("*****************************************INPUT NULL DEST**************************************");
return null;
}
try {
config.load(input);
return config;
} catch (IOException io) {
if(input!=null){
try {
input.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return config;
}`
But withoud any success. I have tried to rename the constant to "META-INF/config.properties" and still getting null.