标签:
文件位置:
文件内容:
代码:
public class Test{ public static void main (String[] args) throws IOException{ Properties pro = new Properties(); FileInputStream in =null; try{ in = new FileInputStream("config\\db.properties"); }catch (FileNotFoundException e){ // TODO Auto-generated catch block e.printStackTrace(); } pro.load(in); System.out.println (pro.getProperty ("driverName")); // } }
标签:
原文地址:http://www.cnblogs.com/staryy/p/4243610.html