java讀取properties檔案

luxika發表於2011-10-08
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("/com/eway/xsht/XshtConstant.properties");

Properties p = new Properties();

try {
p.load(inputStream);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

相關文章