java代码:
public static final String PARAMSFILEPAHT = PropertyResourceBundle.getBundle("application").getString("paramsFilePaht");
main方法:
String filename = PARAMSFILEPAHT;
File f = new File(filename);
InputStream in = new FileInputStream(f);
Properties props = new Properties();
props.load(in);
String h = props.getProperty("jdbc.password");
System.out.println(h);