classes目录:DBUtil.class.getClassLoader().getResourceAsStream("testing.properties");
DBUtil.class所在目录:DBUtil.class.getResourceAsStream("testing.properties");

  Properties props = new Properties();
  props.load(DBUtil.class.getClassLoader().getResourceAsStream("testing.properties"));
  strDriver = props.getProperty("Driver"); 
  strURL = props.getProperty("URL");
  strUser = props.getProperty("User");
  strPassword = props.getProperty("Password");
  System.out.println("strDriver="+strDriver);
  System.out.println("strURL="+strURL);
  System.out.println("strUser="+strUser);
  System.out.println("strPassword="+strPassword);