java读取properties文件

        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();
}

你可能感兴趣的:(properties)