InputStream in=this.getClass().getResourceAsStream("/config.properties");
Properties ppt=new Properties();
try {
ppt.load(in);
ppt.setProperty(key, value);
} catch (IOException e) {
e.printStackTrace();
}finally{
if(in!=null){
try {
in.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}